Revision 1526,
1.2 KB
checked in by gumbau, 18 years ago
(diff) |
Updated modules to the new interface and the new simplification algorithm improvements.
|
Line | |
---|
1 | #include <stdio.h>
|
---|
2 | #include <string.h>
|
---|
3 | #include <stdlib.h>
|
---|
4 | #include <iostream>
|
---|
5 | #include <list>
|
---|
6 | #include <vector>
|
---|
7 | #include <algorithm>
|
---|
8 |
|
---|
9 | #include <GeoBase.h>
|
---|
10 |
|
---|
11 | #include <set>
|
---|
12 |
|
---|
13 | using namespace std;
|
---|
14 | using namespace Geometry;
|
---|
15 |
|
---|
16 | /*#define X 0
|
---|
17 | #define Y 1
|
---|
18 | #define Z 2*/
|
---|
19 |
|
---|
20 | #define MAXUINT 2^4-1
|
---|
21 |
|
---|
22 | #pragma pack(1)
|
---|
23 | typedef struct
|
---|
24 | {
|
---|
25 | uint32 strip;
|
---|
26 | char nP,nL1,nL2,obligatory;
|
---|
27 | } LODData;
|
---|
28 | #pragma pack()
|
---|
29 |
|
---|
30 | typedef vector <LODData> LODChanges;
|
---|
31 |
|
---|
32 | //-----------------
|
---|
33 |
|
---|
34 | typedef struct
|
---|
35 | {
|
---|
36 | float Vertex[3];
|
---|
37 | float Normal[3];
|
---|
38 | float TexCoords[2];
|
---|
39 | unsigned int obligatory;
|
---|
40 | int numMesh;
|
---|
41 | uint32 Next;
|
---|
42 | bool repetido;
|
---|
43 | } tipoVertice;
|
---|
44 |
|
---|
45 | typedef struct
|
---|
46 | {
|
---|
47 | float Vertex[3];
|
---|
48 | } tipoNormal;
|
---|
49 |
|
---|
50 | //--- Para calcular la simplificacion
|
---|
51 | typedef struct
|
---|
52 | {
|
---|
53 | uint32 vQslimNext;
|
---|
54 | uint32 vQslim;
|
---|
55 | uint32 vLSNext;
|
---|
56 | uint32 vLS;
|
---|
57 | unsigned int obligatory;
|
---|
58 | float x;
|
---|
59 | char *cambio;
|
---|
60 | } tipoOrden;
|
---|
61 |
|
---|
62 | typedef vector <int32> VECTORINT;
|
---|
63 | typedef vector<int32> VECTORUNINT;
|
---|
64 | typedef vector<tipoVertice> VECTORVERTEX;
|
---|
65 | typedef list <int32> LISTINT;
|
---|
66 | typedef set <int32> SET_INT;
|
---|
67 |
|
---|
68 | //// FUNCIONES DE ALLOCATE
|
---|
69 | uint32 **Allocate2DArrayINT( uint32 nRows, uint32 nCols);
|
---|
70 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.