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

Revision 1014, 1.8 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        //      Mesh primitives.
32        typedef enum
33        {
34                GEO_TRIANGLE_LIST,
35                GEO_TRIANGLE_STRIPS
36        } MeshType;
37
38        struct VertexBoneAssignment
39        {
40                unsigned int vertexIndex;
41                unsigned short boneIndex;
42                Real weight;
43
44        };
45
46        struct  MeshBounds
47        {
48                float   maxX;
49                float   maxY;
50                float   maxZ;
51                float   minX;
52                float   minY;
53                float   minZ;
54                float   radius;
55                float   scaleFactor;
56        };
57       
58        //      Needed to update the progress bar.
59        typedef float updateProgressBar(float);
60        typedef updateProgressBar *TIPOFUNC;
61        //-----------------------------------//
62
63} // end of Geometry namespace
64
65
66#define GEO_ENDIAN_LITTLE 1
67#define GEO_ENDIAN_BIG 2
68
69// Default = Little endian (define CONFIG_BIG_ENDIAN to change it)
70#ifdef CONFIG_BIG_ENDIAN
71#       define GEO_ENDIAN GEO_ENDIAN_BIG
72#else
73#       define GEO_ENDIAN GEO_ENDIAN_LITTLE
74#endif
75
76#endif
77
Note: See TracBrowser for help on using the repository browser.