-
Notifications
You must be signed in to change notification settings - Fork 6
/
OctNode.cuh
100 lines (86 loc) · 1.76 KB
/
OctNode.cuh
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
96
97
98
99
100
//
// Created by davidxu on 22-7-26.
//
#ifndef GPU_POISSONRECON_OCTNODE_CUH
#define GPU_POISSONRECON_OCTNODE_CUH
class OctNode{
public:
int key;
int pidx;
int pnum;
int parent;
int children[8];
int neighs[27];
// record the start in maxDepth NodeArray
// the first node at maxDepth is index 0
int didx;
int dnum;
// (real idx) + 1,
// idx start from (0 + 1)
// encode the vertices idx?
int vertices[8];
// (real idx) + 1,
// idx start from (0 + 1)
int edges[12];
// (real idx) + 1
// idx start from (0 + 1)
int faces[6];
int hasTriangle;
int hasIntersection;
};
class EasyOctNode{
public:
int key;
int parent;
int children[8];
int neighs[27];
// (real idx) + 1,
// idx start from (0 + 1)
// encode the vertices idx?
int vertices[8];
// (real idx) + 1,
// idx start from (0 + 1)
int edges[12];
__device__ EasyOctNode& operator = (const OctNode& n){
key = n.key;
parent = n.parent;
#pragma unroll
for(int i=0;i<8;++i){
children[i] = n.children[i];
vertices[i] = n.vertices[i];
}
#pragma unroll
for(int i=0;i<27;++i){
neighs[i] = n.neighs[i];
}
#pragma unroll
for(int i=0;i<12;++i){
edges[i] = n.edges[i];
}
}
};
class VertexNode{
public:
Point3D<float> pos;
int ownerNodeIdx;
int vertexKind;
int depth;
// encode the nodes?
int nodes[8];
};
class EdgeNode{
public:
// int orientation;
// int off[2];
int edgeKind;
int ownerNodeIdx;
int nodes[4];
};
class FaceNode{
public:
int faceKind;
int ownerNodeIdx;
int hasParentFace;
int nodes[2];
};
#endif //GPU_POISSONRECON_OCTNODE_CUH