Line | |
---|
1 | /*! |
---|
2 | * @file md3_mesh.h |
---|
3 | * |
---|
4 | * Code heavely inspired by: JAVA MD3 Model Viewer - A Java based Quake 3 model viewer |
---|
5 | * Copyright (C) 1999 Erwin 'KLR8' Vervaet |
---|
6 | */ |
---|
7 | |
---|
8 | #ifndef _MD3_MESH_H |
---|
9 | #define _MD3_MESH_H |
---|
10 | |
---|
11 | |
---|
12 | #include <string> |
---|
13 | |
---|
14 | #include "md_model_structure.h" |
---|
15 | |
---|
16 | #include "vector.h" |
---|
17 | |
---|
18 | |
---|
19 | namespace md3 |
---|
20 | { |
---|
21 | |
---|
22 | class MD3Mesh |
---|
23 | { |
---|
24 | public: |
---|
25 | MD3Mesh(FILE *pFile, int dataOffset); |
---|
26 | virtual ~MD3Mesh(); |
---|
27 | |
---|
28 | |
---|
29 | private: |
---|
30 | std::string id; //!< id of the mesh |
---|
31 | std::string name; //!< the name of the mesh |
---|
32 | |
---|
33 | int numFrameMesh; //!< number of mesh fames |
---|
34 | int numTexture; //!< number of textures |
---|
35 | int numVertex; //!< number of verteces |
---|
36 | |
---|
37 | int numTriangle; //!< number of triangles |
---|
38 | int triangleStart; //!< start triangle |
---|
39 | int textureStart; //!< start texture |
---|
40 | int texVecStart; //!< texture vector start |
---|
41 | int vertexStart; //!< start of the verteces |
---|
42 | |
---|
43 | int meshSize; //!< the mesh size |
---|
44 | |
---|
45 | |
---|
46 | //MD3Texture* textures; //!< array of textures of size textureNum |
---|
47 | int* triangles; //!< indices into mesh frames and texture coord arrays |
---|
48 | float* textureCoords; //!< U/V textures coordinates of vertices |
---|
49 | Vector meshFrames; //!< mesh frames |
---|
50 | }; |
---|
51 | |
---|
52 | } |
---|
53 | |
---|
54 | #endif /* _MD3_MESH_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.