33 #ifndef __H__UG__prism_rules__
34 #define __H__UG__prism_rules__
40 namespace prism_rules{
56 {0, 3}, {1, 4}, {2, 5},
57 {3, 4}, {4, 5}, {5, 3}};
62 {1, 4, 5, 2}, {2, 5, 3, 0},
72 const int OPPOSED_OBJECT[][
NUM_VERTICES] = {{1, 7}, {1, 8}, {1, 6}, {1, 1}, {1, 2}, {1, 0}};
84 const int TRIS[2] = {0, 4};
92 const int FACE_EDGE_INDS[5][4] = {{0, 1, 2, -1}, {3, 6, 4, 0}, {4, 7, 5, 1},
93 {5, 8, 3, 2}, {8, 7, 6, -1}};
99 {{1, 1, 1, 0, 0, 0, 0, 0, 0}, {1, 0, 0, 1, 1, 0, 1, 0, 0},
100 {0, 1, 0, 0, 1, 1, 0, 1, 0}, {0, 0, 1, 1, 0, 1, 0, 0, 1},
101 {0, 0, 0, 0, 0, 0, 1, 1, 1}};
108 {{-1, 0, 2, 3, -1, -1}, {0, -1, 1, -1, 4, -1},
109 {2, 1, -1, -1, -1, 5}, {3, -1, -1, -1, 6, 8},
110 {-1, 4, -1, 6, -1, 7}, {-1, -1, 5, 8, 7, -1}};
117 {{{-1, -1, -1, -1, -1, -1}, {-1, -1, 0, 1, 1, -1},
118 {-1, 0, -1, 3, -1, 3}, {-1, 1, 3, -1, 1, 3},
119 {-1, 1, -1, 1, -1, -1}, {-1, -1, 3, 3, -1, -1}},
120 {{-1, -1, 0, 1, 1, -1}, {-1, -1, -1, -1, -1, -1},
121 {0, -1, -1, -1, 2, 2}, {1, -1, -1, -1, 1, -1},
122 {1, -1, 2, 1, -1, 2}, {-1, -1, 2, -1, 2, -1}},
123 {{-1, 0, -1, 3, -1, 3}, {0, -1, -1, -1, 2, 2},
124 {-1, -1, -1, -1, -1, -1}, {3, -1, -1, -1, -1, 3},
125 {-1, 2, -1, -1, -1, 2}, {3, 2, -1, 3, 2, -1}},
126 {{-1, 1, 3, -1, 1, 3}, {1, -1, -1, -1, 1, -1},
127 {3, -1, -1, -1, -1, 3}, {-1, -1, -1, -1, -1, -1},
128 {1, 1, -1, -1, -1, 4}, {3, -1, 3, -1, 4, -1}},
129 {{-1, 1, -1, 1, -1, -1}, {1, -1, 2, 1, -1, 2},
130 {-1, 2, -1, -1, -1, 2}, {1, 1, -1, -1, -1, 4},
131 {-1, -1, -1, -1, -1, -1}, {-1, 2, 2, 4, -1, -1}},
132 {{-1, -1, 3, 3, -1, -1}, {-1, -1, 2, -1, 2, -1},
133 {3, 2, -1, 3, 2, -1}, {3, -1, 3, -1, 4, -1},
134 {-1, 2, 2, 4, -1, -1}, {-1, -1, -1, -1, -1, -1}}};
138 {{0, 0, 0, 1, 1, -1, 1, -1, -1}, {0, 0, 0, -1, 2, 2, -1, 2, -1},
139 {0, 0, 0, 3, -1, 3, -1, -1, 3}, {1, -1, 3, 1, 1, 3, 1, -1, 3},
140 {1, 2, -1, 1, 1, 2, 1, 2, -1}, {-1, 2, 3, 3, 2, 2, -1, 2, 3},
141 {1, -1, -1, 1, 1, -1, 1, 4, 4}, {-1, 2, -1, -1, 2, 2, 4, 2, 4},
142 {-1, -1, 3, 3, -1, 3, 4, 4, 3}};
188 int Refine(
int* newIndsOut,
int* newEdgeVrts,
bool& newCenterOut,
189 vector3* corners = NULL,
bool* isSnapPoint = NULL);
241 template <
class TCmp>
const int NUM_VERTICES
Definition: prism_rules.h:45
const int BOTTOM_FACE
Definition: prism_rules.h:78
const int NUM_QUADS
Definition: prism_rules.h:49
const int FACE_CONTAINS_EDGE[][9]
tells whether the i-th face contains the j-th edge
Definition: prism_rules.h:98
const int NUM_EDGES
Definition: prism_rules.h:46
const int NUM_TRIS
Definition: prism_rules.h:48
int CollapseEdge(int *newIndsOut, int v0, int v1)
Creates new volume elements that result from collapsing the edge between v0 and v1 into v0.
Definition: prism_rules.cpp:612
const int MAX_NUM_COLLAPSE_INDS_OUT
Definition: prism_rules.h:52
int Refine(int *newIndsOut, int *newEdgeVrts, bool &newCenterOut, vector3 *, bool *isSnapPoint)
Definition: prism_rules.cpp:66
const int EDGE_VRT_INDS[][2]
the local vertex indices of the given edge
Definition: prism_rules.h:55
const int TRIS[2]
Definition: prism_rules.h:84
const int IS_SIDE_EDGE[9]
Definition: prism_rules.h:81
const int QUADS[3]
Definition: prism_rules.h:85
const int NUM_FACES
Definition: prism_rules.h:47
const int FACE_FROM_EDGES[][9]
given two edges, the table returns the face, which contains both (or -1)
Definition: prism_rules.h:137
int ConvertToTetrahedra(int *newIndsOut, TCmp cmp)
fills an array of integers describing tetrahedra that shall replace the prism
Definition: prism_rules_impl.h:43
const int IS_BOTTOM_EDGE[9]
Definition: prism_rules.h:80
const int OPPOSED_OBJECT[][NUM_VERTICES]
Definition: prism_rules.h:72
const int MAX_NUM_INDS_OUT
Definition: prism_rules.h:50
const int FACE_EDGE_INDS[5][4]
returns the j-th edge of the i-th face
Definition: prism_rules.h:92
const int IS_TOP_EDGE[9]
Definition: prism_rules.h:82
const int FACE_FROM_VRTS[6][6][6]
Associates the index of the connecting face with each triple of vertices.
Definition: prism_rules.h:116
const int EDGE_FROM_VRTS[6][6]
Associates the index of the connecting edge with each tuple of vertices.
Definition: prism_rules.h:107
const int OPPOSED_FACE[NUM_FACES]
the index of the face opposed to the given one. -1 if no face is opposed
Definition: prism_rules.h:66
const int MAX_NUM_CONVERT_TO_TETS_INDS_OUT
Definition: prism_rules.h:51
const int FACE_VRT_INDS[][4]
the local vertex indices of the given face
Definition: prism_rules.h:60
const int TOP_FACE
Definition: prism_rules.h:77
bool IsRegularRefRule(const int edgeMarks)
returns true if the specified edgeMarks would lead to a regular refinement
Definition: prism_rules.cpp:642