-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdataStructures.h
More file actions
95 lines (68 loc) · 1.38 KB
/
Copy pathdataStructures.h
File metadata and controls
95 lines (68 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#ifndef DATASTRUCTURES_H
#define DATASTRUCTURES_H
//holds the definitins of various datastructures
struct HE_vert;
struct HE_edge;
struct HE_face;
typedef struct Point
{
float x,y,z;
}Point3;
typedef struct intersectedNode
{
struct Point pt;
int node;
}intersectedNode;
typedef struct Face
{
int p1,p2,p3;
}Face3;
typedef struct HE_vert
{
int no;
float x;
float y;
float z;
float quadrics[4][4];
float normals[3];
struct HE_edge* edge; // one of the half-edges emantating from the vertex
int degree;
int updatedFlag;
}heVertex;
typedef struct HE_edge
{
HE_vert *vert; // vertex at the end of the half-edge
HE_edge* pair; // oppositely oriented adjacent half-edge
HE_face* face; // face the half-edge borders
HE_edge* next; // next half-edge around the face
}heEdge;
typedef struct HE_face
{
int no;
HE_edge* edge; // one of the half-edges bordering the face
//float a,b,c,d; //for planes
float varr[4];
float normals[3];
int updateFlag;
long int clusterNo;
float centroid[3];
}heFace;
typedef struct eError
{
Point3 p1,p2;
HE_edge* edge;
float error;
int faceNo;
}edgeError;
typedef struct dualEdge
{
int node;
float traversalCost;
float cutCost;
float wtheta;
}dualEdge;
typedef struct dualNode
{
float avgWtheta;
};
#endif // DATASTRUCTURES_H