]> git.lizzy.rs Git - irrlicht.git/blob - source/Irrlicht/CSMFMeshFileLoader.h
Fix some more problems with OSX build file.
[irrlicht.git] / source / Irrlicht / CSMFMeshFileLoader.h
1 // Copyright (C) 2010-2012 Gaz Davidson\r
2 // This file is part of the "Irrlicht Engine".\r
3 // For conditions of distribution and use, see copyright notice in irrlicht.h\r
4 \r
5 #ifndef __C_SMF_MESH_LOADER_H_INCLUDED__\r
6 #define __C_SMF_MESH_LOADER_H_INCLUDED__\r
7 \r
8 #include "IMeshLoader.h"\r
9 #include "SMesh.h"\r
10 \r
11 namespace irr\r
12 {\r
13 \r
14 namespace video\r
15 {\r
16         class IVideoDriver;\r
17 }\r
18 namespace io\r
19 {\r
20         class IFileSystem;\r
21 }\r
22 \r
23 namespace scene\r
24 {\r
25 \r
26 //! Class which can load\r
27 class CSMFMeshFileLoader : public virtual IMeshLoader\r
28 {\r
29 public:\r
30 \r
31         CSMFMeshFileLoader(irr::io::IFileSystem* fs, video::IVideoDriver* driver);\r
32 \r
33         //! Returns true if the file might be loaded by this class.\r
34         virtual bool isALoadableFileExtension(const io::path& filename) const _IRR_OVERRIDE_;\r
35 \r
36         //! Creates/loads an animated mesh from the file.\r
37         virtual IAnimatedMesh* createMesh(io::IReadFile* file) _IRR_OVERRIDE_;\r
38 private:\r
39 \r
40         void loadLimb(io::IReadFile* file, scene::SMesh* mesh, const core::matrix4 &parentTransformation);\r
41 };\r
42 \r
43 } // end namespace scene\r
44 \r
45 namespace io\r
46 {\r
47         class BinaryFile\r
48         {\r
49         public:\r
50                 //! reads most types from the given file, moving the file pointer along\r
51                 template <class T>\r
52                 static void read(io::IReadFile* file, T &out, bool bigEndian=false);\r
53 \r
54                 //! reads a 3d vector from the file, moving the file pointer along\r
55                 static void read(io::IReadFile* file, core::vector3df &outVector2d, bool bigEndian=false);\r
56 \r
57                 //! reads a 2d vector from the file, moving the file pointer along\r
58                 static void read(io::IReadFile* file, core::vector2df &outVector2d, bool bigEndian=false);\r
59 \r
60                 //! reads a null terminated string from the file, moving the file pointer along\r
61                 static void read(io::IReadFile* file, core::stringc &outString, bool bigEndian=false);\r
62 \r
63         };\r
64 }\r
65 \r
66 } // end namespace irr\r
67 \r
68 #endif // __C_SMF_MESH_LOADER_H_INCLUDED__\r
69 \r