ScummVM API documentation
3dmesh.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 WINTERMUTE_3D_MESH_H
23 #define WINTERMUTE_3D_MESH_H
24 
25 #include "common/memstream.h"
26 
27 #include "math/vector4d.h"
28 
29 namespace Wintermute {
30 
32  float x;
33  float y;
34  float z;
35 };
36 
37 class Mesh3DS {
38 public:
39  Mesh3DS();
40  virtual ~Mesh3DS();
41  virtual void fillVertexBuffer(uint32 color) = 0;
42  virtual bool loadFrom3DS(Common::MemoryReadStream &fileStream);
43  virtual void render() = 0;
44  virtual void dumpVertexCoordinates(const char *filename);
45  virtual int faceCount();
46  virtual uint16 *getFace(int index);
47 
48  virtual int vertexCount();
49  virtual float *getVertexPosition(int index);
50 
51 protected:
52  GeometryVertex *_vertexData;
53  uint16 _vertexCount;
54  uint16 *_indexData;
55  uint16 _indexCount;
56  Math::Vector4d _color;
57 };
58 
59 } // namespace Wintermute
60 
61 #endif
Definition: 3dmesh.h:31
Definition: 3dmesh.h:37
Definition: memstream.h:43
Definition: achievements_tables.h:27