xoreos  0.0.5
walkmesh.h
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #ifndef ENGINES_KOTOR_WALKMESH_H
26 #define ENGINES_KOTOR_WALKMESH_H
27 
28 #include "glm/mat4x4.hpp"
29 
30 #include "src/common/readstream.h"
31 #include "src/common/types.h"
32 
33 #include "src/aurora/types.h"
34 
36 
37 namespace Engines {
38 
39 namespace KotOR {
40 
42 public:
43  void load(const Common::UString &resRef,
45  const glm::mat4 &transform = glm::mat4());
46 private:
47  void appendFromStream(Common::SeekableReadStream &stream, const glm::mat4 &transform);
48 
50  uint32 faceCount,
51  uint32 faceTypeOffset);
52 
54  uint32 faceCount,
55  uint32 faceOffset);
56 
58  uint32 vertexCount,
59  uint32 vertexOffset,
60  const glm::mat4 &transform);
61 };
62 
63 } // End of namespace KotOR
64 
65 } // End of namespace Engines
66 
67 #endif // ENGINES_KOTOR_WALKMESH_H
void appendFromStream(Common::SeekableReadStream &stream, const glm::mat4 &transform)
Definition: walkmesh.cpp:55
A class holding an UTF-8 string.
Definition: ustring.h:48
void appendIndices(Common::SeekableReadStream &stream, uint32 faceCount, uint32 faceOffset)
Definition: walkmesh.cpp:111
void appendFaceTypes(Common::SeekableReadStream &stream, uint32 faceCount, uint32 faceTypeOffset)
Definition: walkmesh.cpp:86
void appendVertices(Common::SeekableReadStream &stream, uint32 vertexCount, uint32 vertexOffset, const glm::mat4 &transform)
Definition: walkmesh.cpp:137
Walk mesh.
Definition: types.h:85
Low-level type definitions to handle fixed width types portably.
Basic reading stream interfaces.
Basic type definitions to handle files used in BioWare&#39;s Aurora engine.
uint32_t uint32
Definition: types.h:204
FileType
Various file types used by the Aurora engine and found in archives.
Definition: types.h:56
Generic renderable walkmesh.
Interface for a seekable & readable data stream.
Definition: readstream.h:265
void load(const Common::UString &resRef, ::Aurora::FileType type=::Aurora::kFileTypeWOK, const glm::mat4 &transform=glm::mat4())
Definition: walkmesh.cpp:35