ScummVM API documentation
biffmesh.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef STARK_FORMATS_BIFF_MESH_H
23 #define STARK_FORMATS_BIFF_MESH_H
24 
25 #include "engines/stark/model/model.h"
26 
27 #include "common/array.h"
28 
29 #include "math/matrix4.h"
30 #include "math/vector3d.h"
31 
32 namespace Stark {
33 
34 class ArchiveReadStream;
35 
36 namespace Formats {
37 
38 class BiffObject;
39 class BiffMesh;
40 
47 public:
49  static BiffMesh *read(ArchiveReadStream *stream);
50 
51 private:
52  static BiffObject *biffObjectBuilder(uint32 type);
53 
54 };
55 
59 class BiffMesh {
60 public:
61  struct Vertex {
62  Math::Vector3d position;
63  Math::Vector3d normal;
64  Math::Vector3d texturePosition;
65  };
66 
67  BiffMesh(const Common::Array<Vertex> &vertices, const Common::Array<Face> &faces, const Common::Array<Material> &materials);
68 
69  const Common::Array<Vertex> &getVertices() const;
70  const Common::Array<Face> &getFaces() const;
71  const Common::Array<Material> &getMaterials() const;
72  Math::Matrix4 getTransform() const;
73 
74  void setTransform(const Math::Matrix4 &transform);
75 
76 private:
77  Common::Array<Vertex> _vertices;
78  Common::Array<Face> _faces;
79  Common::Array<Material> _materials;
80 
81  Math::Matrix4 _transform;
82 };
83 
84 } // End of namespace Formats
85 } // End of namespace Stark
86 
87 #endif // STARK_FORMATS_BIFF_MESH_H
static BiffMesh * read(ArchiveReadStream *stream)
Definition: biff.h:72
Definition: biffmesh.h:59
Definition: array.h:52
Definition: biffmesh.h:46
Definition: console.h:27
Definition: biffmesh.h:61
Definition: archiveloader.h:46