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

Revision 1526, 1.8 KB checked in by gumbau, 18 years ago (diff)

Updated modules to the new interface and the new simplification algorithm improvements.

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        struct  MeshBounds
46        {
47                float   maxX;
48                float   maxY;
49                float   maxZ;
50                float   minX;
51                float   minY;
52                float   minZ;
53                float   radius;
54                float   scaleFactor;
55        };
56
57        //      Needed to update the progress bar.
58        typedef float updateProgressBar(float);
59        typedef updateProgressBar *TIPOFUNC;
60        //-----------------------------------//
61
62} // end of Geometry namespace
63
64#define GEO_ENDIAN_LITTLE 1
65#define GEO_ENDIAN_BIG 2
66
67// Default = Little endian (define CONFIG_BIG_ENDIAN to change it)
68#ifdef CONFIG_BIG_ENDIAN
69#       define GEO_ENDIAN GEO_ENDIAN_BIG
70#else
71#       define GEO_ENDIAN GEO_ENDIAN_LITTLE
72#endif
73
74#endif
75
Note: See TracBrowser for help on using the repository browser.