33 #ifndef __H__UG__octahedron_rules__
34 #define __H__UG__octahedron_rules__
60 {1, 2}, {2, 3}, {3, 4}, {4, 1},
61 {1, 5}, {2, 5}, {3, 5}, {4, 5}};
64 const int FACE_VRT_INDS[][4] = { {0, 1, 2, -1}, {0, 2, 3, -1}, {0, 3, 4, -1}, {0, 4, 1, -1},
65 {1, 5, 2, -1}, {2, 5, 3, -1}, {3, 5, 4, -1}, {4, 5, 1, -1}};
76 const int OPPOSED_OBJECT[][
NUM_VERTICES] = {{0, 5}, {0, 3}, {0, 4}, {0, 1}, {0, 2}, {0, 0}};
84 const int FACE_EDGE_INDS[8][4] = { {0, 4, 1, -1}, {1, 5, 2, -1}, {2, 6, 3, -1}, {3, 7, 0, -1},
85 {8, 9, 4, -1}, {9, 10, 5, -1}, {10, 11, 6, -1}, {11, 8, 7, -1}};
88 const int FACE_CONTAINS_EDGE[][12] = { {1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0},
89 {0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0},
90 {0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0},
91 {1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0},
92 {0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0},
93 {0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0},
94 {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1},
95 {0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1}};
101 const int EDGE_FROM_VRTS[6][6] = { {-1, 0, 1, 2, 3, -1}, {0, -1, 4, -1, 7, 8}, {1, 4, -1, 5, -1, 9},
102 {2, -1, 5, -1, 6, 10}, {3, 7, -1, 6, -1, 11}, {-1, 8, 9, 10, 11, -1}};
108 const int FACE_FROM_VRTS[6][6][6] = { {{-1, -1, -1, -1, -1, -1}, {-1, -1, 0, -1, 3, -1}, {-1, 0, -1, 1, -1, -1}, {-1, -1, 1, -1, 2, -1}, {-1, 3, -1, 2, -1, -1}, {-1, -1, -1, -1, -1, -1}},
109 {{-1, -1, 0, -1, 3, -1}, {-1, -1, -1, -1, -1, -1}, {0, -1, -1, -1, -1, 4}, {-1, -1, -1, -1, -1, -1}, {3, -1, -1, -1, -1, 7}, {-1, -1, 4, -1, 7, -1}},
110 {{-1, 0, -1, 1, -1, -1}, {0, -1, -1, -1, -1, 4}, {-1, -1, -1, -1, -1, -1}, {1, -1, -1, -1, -1, 5}, {-1, -1, -1, -1, -1, -1}, {-1, 4, -1, 5, -1, -1}},
111 {{-1, -1, 1, -1, 2, -1}, {-1, -1, -1, -1, -1, -1}, {1, -1, -1, -1, -1, 5}, {-1, -1, -1, -1, -1, -1}, {2, -1, -1, -1, -1, 6}, {-1, -1, 5, -1, 6, -1}},
112 {{-1, 3, -1, 2, -1, -1}, {3, -1, -1, -1, -1, 7}, {-1, -1, -1, -1, -1, -1}, {2, -1, -1, -1, -1, 6}, {-1, -1, -1, -1, -1, -1}, {-1, 7, -1, 6, -1, -1}},
113 {{-1, -1, -1, -1, -1, -1}, {-1, -1, 4, -1, 7, -1}, {-1, 4, -1, 5, -1, -1}, {-1, -1, 5, -1, 6, -1}, {-1, 7, -1, 6, -1, -1}, {-1, -1, -1, -1, -1, -1}}};
116 const int FACE_FROM_EDGES[][12] = { {0, 0, -1, 3, 0, -1, -1, 3, -1, -1, -1, -1}, {0, 0, 1, -1, 0, 1, -1, -1, -1, -1, -1, -1},
117 {-1, 1, 1, 2, -1, 1, 2, -1, -1, -1, -1, -1}, {3, -1, 2, 2, -1, -1, 2, 3, -1, -1, -1, -1},
118 {0, 0, -1, -1, 0, -1, -1, -1, 4, 4, -1, -1}, {-1, 1, 1, -1, -1, 1, -1, -1, -1, 5, 5, -1},
119 {-1, -1, 2, 2, -1, -1, 2, -1, -1, -1, 6, 6}, {3, -1, -1, 3, -1, -1, -1, 3, 7, -1, -1, 7},
120 {-1, -1, -1, -1, 4, -1, -1, 7, 4, 4, -1, 7}, {-1, -1, -1, -1, 4, 5, -1, -1, 4, 4, 5, -1},
121 {-1, -1, -1, -1, -1, 5, 6, -1, -1, 5, 5, 6}, {-1, -1, -1, -1, -1, -1, 6, 7, 7, -1, 6, 6}};
170 int Refine(
int* newIndsOut,
int* newEdgeVrts,
bool& newCenterOut,
171 vector3* corners = NULL,
bool* isSnapPoint = NULL);
const int NUM_FACES
Definition: octahedron_rules.h:47
const int EDGE_FROM_VRTS[6][6]
Associates the index of the connecting edge with each tuple of vertices.
Definition: octahedron_rules.h:101
const int FACE_EDGE_INDS[8][4]
returns the j-th edge of the i-th face
Definition: octahedron_rules.h:84
const int BOTTOM_VERTEX
the octhedrons bottom
Definition: octahedron_rules.h:68
const int NUM_TRIS
Definition: octahedron_rules.h:48
const int FACE_VRT_INDS[][4]
the local vertex indices of the given face
Definition: octahedron_rules.h:64
const int NUM_VERTICES
Definition: octahedron_rules.h:45
int Refine(int *newIndsOut, int *newEdgeVrts, bool &newCenterOut, vector3 *corners, bool *)
Definition: octahedron_rules.cpp:56
const int FACE_CONTAINS_EDGE[][12]
tells whether the i-th face contains the j-th edge
Definition: octahedron_rules.h:88
const int FACE_FROM_EDGES[][12]
given two edges, the table returns the face, which contains both (or -1)
Definition: octahedron_rules.h:116
const int TOP_VERTEX
the octhedrons top
Definition: octahedron_rules.h:71
bool IsRegularRefRule(const int edgeMarks)
returns true if the specified edgeMarks would lead to a regular refinement
Definition: octahedron_rules.cpp:516
const int OPPOSED_OBJECT[][NUM_VERTICES]
Definition: octahedron_rules.h:76
const int MAX_NUM_INDS_OUT
Definition: octahedron_rules.h:56
const int NUM_QUADS
Definition: octahedron_rules.h:49
const int FACE_FROM_VRTS[6][6][6]
Associates the index of the connecting face with each triple of vertices.
Definition: octahedron_rules.h:108
const int EDGE_VRT_INDS[][2]
the local vertex indices of the given edge
Definition: octahedron_rules.h:59
const int NUM_EDGES
Definition: octahedron_rules.h:46