diff options
author | David Walter Seikel | 2014-01-13 19:47:58 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-01-13 19:47:58 +1000 |
commit | f9158592e1478b2013afc7041d9ed041cf2d2f4a (patch) | |
tree | b16e389d7988700e21b4c9741044cefa536dcbae /libraries/irrlicht-1.8.1/source/Irrlicht/CLWOMeshFileLoader.h | |
parent | Libraries readme updated with change markers and more of the Irrlicht changes. (diff) | |
download | SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.zip SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.gz SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.bz2 SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.xz |
Update Irrlicht to 1.8.1. Include actual change markers this time. lol
Diffstat (limited to '')
-rw-r--r-- | libraries/irrlicht-1.8.1/source/Irrlicht/CLWOMeshFileLoader.h | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8.1/source/Irrlicht/CLWOMeshFileLoader.h b/libraries/irrlicht-1.8.1/source/Irrlicht/CLWOMeshFileLoader.h new file mode 100644 index 0000000..c72d666 --- /dev/null +++ b/libraries/irrlicht-1.8.1/source/Irrlicht/CLWOMeshFileLoader.h | |||
@@ -0,0 +1,87 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | ||
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_LWO_MESH_FILE_LOADER_H_INCLUDED__ | ||
6 | #define __C_LWO_MESH_FILE_LOADER_H_INCLUDED__ | ||
7 | |||
8 | #include "IMeshLoader.h" | ||
9 | #include "SMeshBuffer.h" | ||
10 | #include "irrString.h" | ||
11 | |||
12 | namespace irr | ||
13 | { | ||
14 | namespace io | ||
15 | { | ||
16 | class IReadFile; | ||
17 | class IFileSystem; | ||
18 | } // end namespace io | ||
19 | namespace scene | ||
20 | { | ||
21 | |||
22 | struct SMesh; | ||
23 | class ISceneManager; | ||
24 | |||
25 | //! Meshloader capable of loading Lightwave 3D meshes. | ||
26 | class CLWOMeshFileLoader : public IMeshLoader | ||
27 | { | ||
28 | public: | ||
29 | |||
30 | //! Constructor | ||
31 | CLWOMeshFileLoader(scene::ISceneManager* smgr, io::IFileSystem* fs); | ||
32 | |||
33 | //! destructor | ||
34 | virtual ~CLWOMeshFileLoader(); | ||
35 | |||
36 | //! returns true if the file maybe is able to be loaded by this class | ||
37 | //! based on the file extension (e.g. ".bsp") | ||
38 | virtual bool isALoadableFileExtension(const io::path& filename) const; | ||
39 | |||
40 | //! creates/loads an animated mesh from the file. | ||
41 | //! \return Pointer to the created mesh. Returns 0 if loading failed. | ||
42 | //! If you no longer need the mesh, you should call IAnimatedMesh::drop(). | ||
43 | //! See IUnknown::drop() for more information. | ||
44 | virtual IAnimatedMesh* createMesh(io::IReadFile* file); | ||
45 | |||
46 | private: | ||
47 | |||
48 | struct tLWOMaterial; | ||
49 | |||
50 | bool readFileHeader(); | ||
51 | bool readChunks(); | ||
52 | void readObj1(u32 size); | ||
53 | void readTagMapping(u32 size); | ||
54 | void readVertexMapping(u32 size); | ||
55 | void readDiscVertexMapping (u32 size); | ||
56 | void readObj2(u32 size); | ||
57 | void readMat(u32 size); | ||
58 | u32 readString(core::stringc& name, u32 size=0); | ||
59 | u32 readVec(core::vector3df& vec); | ||
60 | u32 readVX(u32& num); | ||
61 | u32 readColor(video::SColor& color); | ||
62 | video::ITexture* loadTexture(const core::stringc& file); | ||
63 | |||
64 | scene::ISceneManager* SceneManager; | ||
65 | io::IFileSystem* FileSystem; | ||
66 | io::IReadFile* File; | ||
67 | SMesh* Mesh; | ||
68 | |||
69 | core::array<core::vector3df> Points; | ||
70 | core::array<core::array<u32> > Indices; | ||
71 | core::array<core::stringc> UvName; | ||
72 | core::array<core::array<u32> > UvIndex; | ||
73 | core::array<core::stringc> DUvName; | ||
74 | core::array<core::array<u32> > VmPolyPointsIndex; | ||
75 | core::array<core::array<core::vector2df> > VmCoordsIndex; | ||
76 | |||
77 | core::array<u16> MaterialMapping; | ||
78 | core::array<core::array<core::vector2df> > TCoords; | ||
79 | core::array<tLWOMaterial*> Materials; | ||
80 | core::array<core::stringc> Images; | ||
81 | u8 FormatVersion; | ||
82 | }; | ||
83 | |||
84 | } // end namespace scene | ||
85 | } // end namespace irr | ||
86 | |||
87 | #endif | ||