-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathOcTreePrint.cpp
More file actions
executable file
·98 lines (84 loc) · 3.16 KB
/
OcTreePrint.cpp
File metadata and controls
executable file
·98 lines (84 loc) · 3.16 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
96
97
98
#include "OcTree.h"
void OcTree::PrintInfo() {
#ifdef CONSOLE_OUTPUT
m_nType = 1;
m_nCountCell = 0;
m_nCountFace = 0;
m_nCountEdge = 0;
m_nCountPoint = 0;
TraversalWithoutPosition();
printf("OcTree with %d cells, %d faces, %d edges, %d points.\n", m_nCountCell, m_nCountFace, m_nCountEdge, m_nCountPoint);
m_nType = 2;
m_nCountCell = 0;
m_nCountFace = 0;
m_nCountEdge = 0;
m_nCountPoint = 0;
TraversalWithoutPosition();
printf("Inside part contains %d cells, %d faces, %d edges, %d points.\n", m_nCountCell, m_nCountFace, m_nCountEdge, m_nCountPoint);
printf("Total %d handles.\n", m_nCountEdge + m_nCountCell - m_nCountFace - m_nCountPoint + 1);
#endif
}
void OcTree::PrintSkeletonInfo() {
#ifdef CONSOLE_OUTPUT
#ifdef CONSOLE_DEBUG
m_nType = 256 + 16;
m_nCountCell = 0;
m_nCountFace = 0;
m_nCountEdge = 0;
m_nCountPoint = 0;
RecNode(m_pInfiniteNode);
RecNode(m_pRoot);
printf("Inside skeleton contains %d cells, %d faces, %d edges, %d points.\n", m_nCountCell, m_nCountFace, m_nCountEdge, m_nCountPoint);
printf("Total %d handles.\n", m_nCountEdge + m_nCountCell - m_nCountFace - m_nCountPoint + 1);
m_nType = 256 + 17;
m_nCountCell = 0;
m_nCountFace = 0;
m_nCountEdge = 0;
m_nCountPoint = 0;
RecNode(m_pInfiniteNode);
RecNode(m_pRoot);
printf("Outside skeleton contains %d cells, %d faces, %d edges, %d points.\n", m_nCountCell, m_nCountFace, m_nCountEdge, m_nCountPoint);
printf("Total %d handles.\n", - m_nCountEdge - m_nCountCell + m_nCountFace + m_nCountPoint + 1);
#endif
#endif
}
void OcTree::PrintSketchingInfo() {
#ifdef CONSOLE_OUTPUT
#ifdef CONSOLE_DEBUG
m_nType = 256 + 18;
m_nSketchCell = 0;
m_nSketchFace = 0;
m_nSketchEdge = 0;
m_nSketchPoint = 0;
RecNode(m_pInfiniteNode);
RecNode(m_pRoot);
printf("Sketching contains %d cells, %d faces, %d edges, %d points.\n", m_nSketchCell, m_nSketchFace, m_nSketchEdge, m_nSketchPoint);
printf("Total %d handles.\n", m_nSketchEdge + m_nSketchCell - m_nSketchFace - m_nSketchPoint + 1);
#endif
#endif
}
void OcTree::PrintPureSkeletonInfo()
{
#ifdef CONSOLE_OUTPUT
#ifdef CONSOLE_DEBUG
int nCount[4];
nCount[0] = nCount[1] = nCount[2] = nCount[3] = 0;
for (list<SkeletonElement>::iterator it = m_listSkeleton.begin(); it != m_listSkeleton.end(); it++) {
if (it->m_pElement->m_bSkeleton)
nCount[it->m_nDimension]++;
}
printf("Inside pure skeleton contains %d cells, %d faces, %d edges, %d points.\n", nCount[3], nCount[2], nCount[1], nCount[0]);
int nOutCount[4];
nOutCount[0] = nOutCount[1] = nOutCount[2] = nOutCount[3] = 0;
for (list<SkeletonElement>::iterator it = m_listDualSkeleton.begin(); it != m_listDualSkeleton.end(); it++) {
if (it->m_pElement->m_bSkeleton)
nOutCount[it->m_nDimension]++;
}
printf("Outside pure skeleton contains %d cells, %d faces, %d edges, %d points.\n", nOutCount[3], nOutCount[2], nOutCount[1], nOutCount[0]);
printf("Handle numbers are : inside = %d, outside = %d\n",
m_nSketchEdge + m_nSketchCell - m_nSketchFace - m_nSketchPoint + 1 + nCount[1] + nCount[3] - nCount[2] - nCount[0],
1 - nOutCount[1] - nOutCount[3] + nOutCount[2] + nOutCount[0]
);
#endif
#endif
}