33 #ifndef __H__UG__hexahedron_rules__
34 #define __H__UG__hexahedron_rules__
55 {0, 4}, {1, 5}, {2, 6}, {3, 7},
56 {4, 5}, {5, 6}, {6, 7}, {7, 4}};
60 {1, 5, 6, 2}, {2, 6, 7, 3},
61 {3, 7, 4, 0}, {4, 7, 6, 5}};
73 {0, 4, 7, 3}, {1, 5, 4, 0},
74 {2, 6, 5, 1}, {0, 3, 2, 1}};
82 {0, 2}, {0, 3}, {0, 0}, {0, 1}};
91 {{0, 1, 2, 3}, {4, 8, 5, 0}, {5, 9, 6, 1},
92 {6, 10, 7, 2}, {7, 11, 4, 3}, {11, 10, 9, 8}};
98 const int FACE_CONTAINS_EDGE[][12] = {{1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0},
99 {1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0},
100 {0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0},
101 {0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0},
102 {0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1},
103 {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1}};
110 {{-1, 0, -1, 3, 4, -1, -1, -1}, {0, -1, 1, -1, -1, 5, -1, -1},
111 {-1, 1, -1, 2, -1, -1, 6, -1}, {3, -1, 2, -1, -1, -1, -1, 7},
112 {4, -1, -1, -1, -1, 8, -1, 11}, {-1, 5, -1, -1, 8, -1, 9, -1},
113 {-1, -1, 6, -1, -1, 9, -1, 10}, {-1, -1, -1, 7, 11, -1, 10, -1}};
120 {{{-1, -1, -1, -1, -1, -1, -1, -1}, {-1, -1, 0, 0, 1, 1, -1, -1},
121 {-1, 0, -1, 0, -1, -1, -1, -1}, {-1, 0, 0, -1, 4, -1, -1, 4},
122 {-1, 1, -1, 4, -1, 1, -1, 4}, {-1, 1, -1, -1, 1, -1, -1, -1},
123 {-1, -1, -1, -1, -1, -1, -1, -1}, {-1, -1, -1, 4, 4, -1, -1, -1}},
124 {{-1, -1, 0, 0, 1, 1, -1, -1}, {-1, -1, -1, -1, -1, -1, -1, -1},
125 {0, -1, -1, 0, -1, 2, 2, -1}, {0, -1, 0, -1, -1, -1, -1, -1},
126 {1, -1, -1, -1, -1, 1, -1, -1}, {1, -1, 2, -1, 1, -1, 2, -1},
127 {-1, -1, 2, -1, -1, 2, -1, -1}, {-1, -1, -1, -1, -1, -1, -1, -1}},
128 {{-1, 0, -1, 0, -1, -1, -1, -1}, {0, -1, -1, 0, -1, 2, 2, -1},
129 {-1, -1, -1, -1, -1, -1, -1, -1}, {0, 0, -1, -1, -1, -1, 3, 3},
130 {-1, -1, -1, -1, -1, -1, -1, -1}, {-1, 2, -1, -1, -1, -1, 2, -1},
131 {-1, 2, -1, 3, -1, 2, -1, 3}, {-1, -1, -1, 3, -1, -1, 3, -1}},
132 {{-1, 0, 0, -1, 4, -1, -1, 4}, {0, -1, 0, -1, -1, -1, -1, -1},
133 {0, 0, -1, -1, -1, -1, 3, 3}, {-1, -1, -1, -1, -1, -1, -1, -1},
134 {4, -1, -1, -1, -1, -1, -1, 4}, {-1, -1, -1, -1, -1, -1, -1, -1},
135 {-1, -1, 3, -1, -1, -1, -1, 3}, {4, -1, 3, -1, 4, -1, 3, -1}},
136 {{-1, 1, -1, 4, -1, 1, -1, 4}, {1, -1, -1, -1, -1, 1, -1, -1},
137 {-1, -1, -1, -1, -1, -1, -1, -1}, {4, -1, -1, -1, -1, -1, -1, 4},
138 {-1, -1, -1, -1, -1, -1, -1, -1}, {1, 1, -1, -1, -1, -1, 5, 5},
139 {-1, -1, -1, -1, -1, 5, -1, 5}, {4, -1, -1, 4, -1, 5, 5, -1}},
140 {{-1, 1, -1, -1, 1, -1, -1, -1}, {1, -1, 2, -1, 1, -1, 2, -1},
141 {-1, 2, -1, -1, -1, -1, 2, -1}, {-1, -1, -1, -1, -1, -1, -1, -1},
142 {1, 1, -1, -1, -1, -1, 5, 5}, {-1, -1, -1, -1, -1, -1, -1, -1},
143 {-1, 2, 2, -1, 5, -1, -1, 5}, {-1, -1, -1, -1, 5, -1, 5, -1}},
144 {{-1, -1, -1, -1, -1, -1, -1, -1}, {-1, -1, 2, -1, -1, 2, -1, -1},
145 {-1, 2, -1, 3, -1, 2, -1, 3}, {-1, -1, 3, -1, -1, -1, -1, 3},
146 {-1, -1, -1, -1, -1, 5, -1, 5}, {-1, 2, 2, -1, 5, -1, -1, 5},
147 {-1, -1, -1, -1, -1, -1, -1, -1}, {-1, -1, 3, 3, 5, 5, -1, -1}},
148 {{-1, -1, -1, 4, 4, -1, -1, -1}, {-1, -1, -1, -1, -1, -1, -1, -1},
149 {-1, -1, -1, 3, -1, -1, 3, -1}, {4, -1, 3, -1, 4, -1, 3, -1},
150 {4, -1, -1, 4, -1, 5, 5, -1}, {-1, -1, -1, -1, 5, -1, 5, -1},
151 {-1, -1, 3, 3, 5, 5, -1, -1}, {-1, -1, -1, -1, -1, -1, -1, -1}}};
154 const int FACE_FROM_EDGES[][12] = {{0, 0, 0, 0, 1, 1, -1, -1, 1, -1, -1, -1},
155 {0, 0, 0, 0, -1, 2, 2, -1, -1, 2, -1, -1},
156 {0, 0, 0, 0, -1, -1, 3, 3, -1, -1, 3, -1},
157 {0, 0, 0, 0, 4, -1, -1, 4, -1, -1, -1, 4},
158 {1, -1, -1, 4, 1, 1, -1, 4, 1, -1, -1, 4},
159 {1, 2, -1, -1, 1, 1, 2, -1, 1, 2, -1, -1},
160 {-1, 2, 3, -1, -1, 2, 2, 3, -1, 2, 3, -1},
161 {-1, -1, 3, 4, 4, -1, 3, 3, -1, -1, 3, 4},
162 {1, -1, -1, -1, 1, 1, -1, -1, 1, 5, 5, 5},
163 {-1, 2, -1, -1, -1, 2, 2, -1, 5, 2, 5, 5},
164 {-1, -1, 3, -1, -1, -1, 3, 3, 5, 5, 3, 5},
165 {-1, -1, -1, 4, 4, -1, -1, 4, 5, 5, 5, 4}};
212 int Refine(
int* newIndsOut,
int* newEdgeVrts,
bool& newCenterOut,
213 vector3* corners = NULL,
bool* isSnapPoint = NULL);
const int FACE_EDGE_INDS[6][4]
returns the j-th edge of the i-th face
Definition: hexahedron_rules.h:90
const int NUM_QUADS
Definition: hexahedron_rules.h:49
const int MAX_NUM_CONVERT_TO_TETS_INDS_OUT
Definition: hexahedron_rules.h:51
const int EDGE_FROM_VRTS[8][8]
Associates the index of the connecting edge with each tuple of vertices.
Definition: hexahedron_rules.h:109
const int NUM_FACES
Definition: hexahedron_rules.h:47
const int MAX_NUM_INDS_OUT
Definition: hexahedron_rules.h:50
const int FACE_CONTAINS_EDGE[][12]
tells whether the i-th face contains the j-th edge
Definition: hexahedron_rules.h:98
const int FACE_FROM_VRTS[8][8][8]
Associates the index of the connecting face with each triple of vertices.
Definition: hexahedron_rules.h:119
int Refine(int *newIndsOut, int *newEdgeVrts, bool &newCenterOut, vector3 *, bool *isSnapPoint)
Definition: hexahedron_rules.cpp:51
const int FACE_VRT_INDS[][4]
the local vertex indices of the given face
Definition: hexahedron_rules.h:59
const int OPPOSED_FACE[NUM_FACES]
contains the index of the opposed face of each face
Definition: hexahedron_rules.h:65
bool IsRegularRefRule(const int edgeMarks)
returns true if the specified edgeMarks would lead to a regular refinement
Definition: hexahedron_rules.cpp:460
const int NUM_TRIS
Definition: hexahedron_rules.h:48
const int NUM_EDGES
Definition: hexahedron_rules.h:46
const int OPPOSED_FACE_VRT_INDS[][4]
vertex indices of the face on the opposite side of the i-th face.
Definition: hexahedron_rules.h:72
const int OPPOSED_OBJECT[][NUM_VERTICES]
Definition: hexahedron_rules.h:81
const int EDGE_VRT_INDS[][2]
the local vertex indices of the given edge
Definition: hexahedron_rules.h:54
const int NUM_VERTICES
Definition: hexahedron_rules.h:45
const int FACE_FROM_EDGES[][12]
given two edges, the table returns the face, which contains both (or -1)
Definition: hexahedron_rules.h:154