Line | |
---|
1 | #ifndef MESH_H |
---|
2 | #define MESH_H |
---|
3 | |
---|
4 | #include <Linear.h> |
---|
5 | |
---|
6 | |
---|
7 | // Define the Data Structures, Mesh class. |
---|
8 | // (Merged the Mesh.h/.cc classes from triedgecol and |
---|
9 | // trisliver...) |
---|
10 | |
---|
11 | struct Triangle; |
---|
12 | |
---|
13 | // Vertex -- used by both |
---|
14 | struct Vertex { |
---|
15 | Vec3f coord; |
---|
16 | int index; |
---|
17 | float confidence; |
---|
18 | |
---|
19 | Triangle **tris; |
---|
20 | uchar numTris; |
---|
21 | |
---|
22 | Vertex **verts; |
---|
23 | uchar numVerts; |
---|
24 | |
---|
25 | uchar maxTris; |
---|
26 | uchar maxVerts; |
---|
27 | |
---|
28 | bool onBoundary; // Is true if the vertex is on a mesh boundary. |
---|
29 | }; |
---|
30 | |
---|
31 | // Triangle -- used by both |
---|
32 | struct Triangle { |
---|
33 | Vertex *vert1, *vert2, *vert3; |
---|
34 | Vec3f norm; |
---|
35 | }; |
---|
36 | |
---|
37 | // Mesh -- used by both |
---|
38 | class Mesh { |
---|
39 | |
---|
40 | public: |
---|
41 | |
---|
42 | int numVerts; |
---|
43 | Vertex *verts; |
---|
44 | |
---|
45 | int numTris; |
---|
46 | Triangle *tris; |
---|
47 | |
---|
48 | Mesh(); |
---|
49 | ~Mesh(); |
---|
50 | }; |
---|
51 | |
---|
52 | |
---|
53 | #endif // MESH_H |
---|
Note: See
TracBrowser
for help on using the repository browser.