Revision 138,
1.4 KB
checked in by hidalgo, 19 years ago
(diff) |
Uploaded WP4 Dummy code(Geometry)
|
Rev | Line | |
---|
[138] | 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 unsigned int uint32;
|
---|
| 20 | typedef unsigned short uint16;
|
---|
| 21 | typedef std::string String;
|
---|
| 22 |
|
---|
| 23 | //Vertex Info
|
---|
| 24 | static const unsigned short VERTEX_EMPTY = 0x00;
|
---|
| 25 | static const unsigned short VERTEX_POSITION = 0x01;
|
---|
| 26 | static const unsigned short VERTEX_NORMAL = 0x02;
|
---|
| 27 | static const unsigned short VERTEX_TEXCOORDS = 0x04;
|
---|
| 28 | static const unsigned short VERTEX_ALL = VERTEX_POSITION | VERTEX_NORMAL | VERTEX_TEXCOORDS;
|
---|
| 29 |
|
---|
| 30 | //Mmesh primitives
|
---|
| 31 | typedef enum
|
---|
| 32 | {
|
---|
| 33 | GEO_TRIANGLE_LIST,
|
---|
| 34 | GEO_TRIANGLE_STRIPS
|
---|
| 35 | } MeshType;
|
---|
| 36 |
|
---|
| 37 | } // end of Geometry namespace
|
---|
| 38 |
|
---|
| 39 |
|
---|
| 40 | #define GEO_ENDIAN_LITTLE 1
|
---|
| 41 | #define GEO_ENDIAN_BIG 2
|
---|
| 42 |
|
---|
| 43 | // Default = Little endian (define CONFIG_BIG_ENDIAN to change it)
|
---|
| 44 | #ifdef CONFIG_BIG_ENDIAN
|
---|
| 45 | # define GEO_ENDIAN GEO_ENDIAN_BIG
|
---|
| 46 | #else
|
---|
| 47 | # define GEO_ENDIAN GEO_ENDIAN_LITTLE
|
---|
| 48 | #endif
|
---|
| 49 |
|
---|
| 50 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.