1 | #ifndef __GEO_BASE__
|
---|
2 | #define __GEO_BASE__
|
---|
3 |
|
---|
4 | #include <string>
|
---|
5 |
|
---|
6 | /// This namespace contains all classes related to geometry operations.
|
---|
7 | /** Geometry namespace includes classes for the following modules:
|
---|
8 | - Serialization: for file loading and saving.
|
---|
9 | - Simplification: for mesh simplification algorithms.
|
---|
10 | - Stripification: methods for finding triangle strips from a mesh.
|
---|
11 | - Construction: builds a LODStrip file from the output of simplification and stripification modules.
|
---|
12 | .
|
---|
13 | */
|
---|
14 | namespace Geometry {
|
---|
15 |
|
---|
16 | //Basic types
|
---|
17 | typedef float Real;
|
---|
18 | typedef unsigned int Index;
|
---|
19 | typedef int int32;
|
---|
20 | typedef unsigned int uint32;
|
---|
21 | typedef unsigned short uint16;
|
---|
22 | typedef std::string String;
|
---|
23 |
|
---|
24 | //Vertex Info
|
---|
25 | static const unsigned short VERTEX_EMPTY = 0x00;
|
---|
26 | static const unsigned short VERTEX_POSITION = 0x01;
|
---|
27 | static const unsigned short VERTEX_NORMAL = 0x02;
|
---|
28 | static const unsigned short VERTEX_TEXCOORDS = 0x04;
|
---|
29 | static const unsigned short VERTEX_ALL = VERTEX_POSITION | VERTEX_NORMAL | VERTEX_TEXCOORDS;
|
---|
30 |
|
---|
31 | //Mmesh primitives
|
---|
32 | typedef enum
|
---|
33 | {
|
---|
34 | GEO_TRIANGLE_LIST,
|
---|
35 | GEO_TRIANGLE_STRIPS
|
---|
36 | } MeshType;
|
---|
37 |
|
---|
38 | //OSCAR
|
---|
39 | struct VertexBoneAssignment
|
---|
40 | {
|
---|
41 | unsigned int vertexIndex;
|
---|
42 | unsigned short boneIndex;
|
---|
43 | Real weight;
|
---|
44 |
|
---|
45 | };
|
---|
46 |
|
---|
47 | // 2006-02-14
|
---|
48 | // Gustavo Puche.
|
---|
49 | // Needed to update the progress bar.
|
---|
50 | typedef float updateProgressBar(float);
|
---|
51 | typedef updateProgressBar *TIPOFUNC;
|
---|
52 | //-----------------------------------//
|
---|
53 |
|
---|
54 | } // end of Geometry namespace
|
---|
55 |
|
---|
56 |
|
---|
57 | #define GEO_ENDIAN_LITTLE 1
|
---|
58 | #define GEO_ENDIAN_BIG 2
|
---|
59 |
|
---|
60 | // Default = Little endian (define CONFIG_BIG_ENDIAN to change it)
|
---|
61 | #ifdef CONFIG_BIG_ENDIAN
|
---|
62 | # define GEO_ENDIAN GEO_ENDIAN_BIG
|
---|
63 | #else
|
---|
64 | # define GEO_ENDIAN GEO_ENDIAN_LITTLE
|
---|
65 | #endif
|
---|
66 |
|
---|
67 | #endif
|
---|