Line | |
---|
1 | /*! |
---|
2 | * @file md3_model.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_MODEL_H |
---|
9 | #define _MD3_MODEL_H |
---|
10 | |
---|
11 | #include <string> |
---|
12 | |
---|
13 | |
---|
14 | class MD3BoneFrame; |
---|
15 | class MD3Mesh; |
---|
16 | |
---|
17 | |
---|
18 | namespace md3 |
---|
19 | { |
---|
20 | |
---|
21 | class MD3Model |
---|
22 | { |
---|
23 | |
---|
24 | public: |
---|
25 | MD3Model(FILE *pFile, int dataOffset); |
---|
26 | ~MD3Model(); |
---|
27 | |
---|
28 | |
---|
29 | |
---|
30 | private: |
---|
31 | std::string filename; //!< the name of the file as recorded in the .md3 file |
---|
32 | std::string loadFilename; //!< filename of the actual file from which data was loaded |
---|
33 | |
---|
34 | int boneFrameNum; //!< number of anumation key fames in the models |
---|
35 | int tagNum; //!< number of tags |
---|
36 | int meshNum; //!< number of meshes |
---|
37 | |
---|
38 | int maxTextureNum; //!< maximum number of unique used in an md3 file |
---|
39 | int boneFrameStart; //!< starting position of bone frame data structures |
---|
40 | int tagStart; //!< starting position of tag-structures |
---|
41 | |
---|
42 | int meshStart; //!< starting position of mesh structures |
---|
43 | |
---|
44 | int fileSize; //!< file size |
---|
45 | |
---|
46 | |
---|
47 | MD3BoneFrame* boneFrames; //!< array of bone frames, contains the metadata (bounding box, tags,...) for each frame |
---|
48 | MD3Mesh* meshes; //!< array of meshes in the model. each containing the mesh for each of the animation |
---|
49 | |
---|
50 | int parentTagIndex; //!< tag index |
---|
51 | MD3Model* parent; //!< reference to the MD3Model |
---|
52 | }; |
---|
53 | } |
---|
54 | |
---|
55 | #endif /* _MD3_MODEL_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.