source: GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoBase.h @ 980

Revision 980, 1.9 KB checked in by gumbau, 18 years ago (diff)
Line 
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*/
14namespace 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        struct  MeshBounds
48        {
49                float   maxX;
50                float   maxY;
51                float   maxZ;
52                float   minX;
53                float   minY;
54                float   minZ;
55                float   radius;
56                float   scaleFactor;
57        };
58       
59        //      2006-02-14
60        //      Gustavo Puche.
61        //      Needed to update the progress bar.
62        typedef float updateProgressBar(float);
63        typedef updateProgressBar *TIPOFUNC;
64        //-----------------------------------//
65
66} // end of Geometry namespace
67
68
69#define GEO_ENDIAN_LITTLE 1
70#define GEO_ENDIAN_BIG 2
71
72// Default = Little endian (define CONFIG_BIG_ENDIAN to change it)
73#ifdef CONFIG_BIG_ENDIAN
74#       define GEO_ENDIAN GEO_ENDIAN_BIG
75#else
76#       define GEO_ENDIAN GEO_ENDIAN_LITTLE
77#endif
78
79#endif
Note: See TracBrowser for help on using the repository browser.