aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/source/Irrlicht/CSMFMeshFileLoader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/source/Irrlicht/CSMFMeshFileLoader.h')
-rw-r--r--src/others/irrlicht-1.8.1/source/Irrlicht/CSMFMeshFileLoader.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CSMFMeshFileLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CSMFMeshFileLoader.h
new file mode 100644
index 0000000..2e87aca
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CSMFMeshFileLoader.h
@@ -0,0 +1,67 @@
1// Copyright (C) 2010-2012 Gaz Davidson
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __C_SMF_MESH_LOADER_H_INCLUDED__
6#define __C_SMF_MESH_LOADER_H_INCLUDED__
7
8#include "IMeshLoader.h"
9#include "SMesh.h"
10
11namespace irr
12{
13
14namespace video
15{
16 class IVideoDriver;
17}
18
19namespace scene
20{
21
22//! Class which can load
23class CSMFMeshFileLoader : public virtual IMeshLoader
24{
25public:
26
27 CSMFMeshFileLoader(video::IVideoDriver* driver);
28
29 //! Returns true if the file might be loaded by this class.
30 virtual bool isALoadableFileExtension(const io::path& filename) const;
31
32 //! Creates/loads an animated mesh from the file.
33 virtual IAnimatedMesh* createMesh(io::IReadFile* file);
34private:
35
36 void loadLimb(io::IReadFile* file, scene::SMesh* mesh, const core::matrix4 &parentTransformation);
37
38 video::IVideoDriver* Driver;
39};
40
41} // end namespace scene
42
43namespace io
44{
45 class BinaryFile
46 {
47 public:
48 //! reads most types from the given file, moving the file pointer along
49 template <class T>
50 static void read(io::IReadFile* file, T &out, bool bigEndian=false);
51
52 //! reads a 3d vector from the file, moving the file pointer along
53 static void read(io::IReadFile* file, core::vector3df &outVector2d, bool bigEndian=false);
54
55 //! reads a 2d vector from the file, moving the file pointer along
56 static void read(io::IReadFile* file, core::vector2df &outVector2d, bool bigEndian=false);
57
58 //! reads a null terminated string from the file, moving the file pointer along
59 static void read(io::IReadFile* file, core::stringc &outString, bool bigEndian=false);
60
61 };
62}
63
64} // end namespace irr
65
66#endif // __C_SMF_MESH_LOADER_H_INCLUDED__
67