ug4
|
Enumerations | |
enum | GlobalRefinementRule { STANDARD , HYBRID_TET_OCT } |
identification of refinement rule to be used More... | |
Functions | |
GlobalRefinementRule | GetRefinementRule () |
void | InverseTetTransform (int *indsOut, const int *transformedInds) |
bool | IsRegularRefRule (const int edgeMarks) |
returns true if the specified edgeMarks would lead to a regular refinement More... | |
int | Refine (int *newIndsOut, int *newEdgeVrts, bool &newCenterOut, vector3 *corners, bool *) |
void | SetRefinementRule (GlobalRefinementRule refRule) |
void | TetRotation (int vrtsInOut[NUM_VERTICES], const int fixedPoint, const size_t steps) |
Rotates the given tetrahedron while keeping the specified point fixed. More... | |
Variables | |
const int | EDGE_FROM_VRTS [4][4] |
Associates the index of the connecting edge with each tuple of vertices. More... | |
const int | EDGE_VRT_INDS [][2] |
the local vertex indices of the given edge More... | |
const int | FACE_CONTAINS_EDGE [][6] |
tells whether the i-th face contains the j-th edge More... | |
const int | FACE_EDGE_INDS [4][4] |
returns the j-th edge of the i-th face More... | |
const int | FACE_FROM_EDGES [][6] |
given two edges, the table returns the face, which contains both (or -1) More... | |
const int | FACE_FROM_VRTS [4][4][4] |
Associates the index of the connecting face with each triple of vertices. More... | |
const int | FACE_VRT_INDS [][4] |
the local vertex indices of the given face More... | |
static GlobalRefinementRule | g_refinementRule = STANDARD |
global refinement rule information switching between regular and subdivision volume refinement More... | |
const int | MAX_NUM_INDS_OUT = 64 |
const int | NUM_EDGES = 6 |
const int | NUM_FACES = 4 |
const int | NUM_QUADS = 0 |
const int | NUM_TRIS = 4 |
const int | NUM_VERTICES = 4 |
const int | OPPOSED_EDGE [] = {5, 3, 4, 1, 2, 0} |
for each edge the local index of the opposed edge More... | |
const int | OPPOSED_OBJECT [][NUM_VERTICES] = {{2, 1}, {2, 2}, {2, 3}, {2, 0}} |
GlobalRefinementRule ug::tet_rules::GetRefinementRule | ( | ) |
References g_refinementRule.
Referenced by ug::ApplySmoothSubdivisionVolumesToTopLevel().
void ug::tet_rules::InverseTetTransform | ( | int * | indsOut, |
const int * | transformedInds | ||
) |
References NUM_VERTICES, and UG_ASSERT.
Referenced by Refine().
bool ug::tet_rules::IsRegularRefRule | ( | const int | edgeMarks | ) |
returns true if the specified edgeMarks would lead to a regular refinement
A regular refinement leads to new elements which are all similar to the original element. I.e. which are of the same type and which have similar angles.
edgeMarks | If the i-th edge shall be refined, the expression 'edgeMarks & (1<<i) != 0' has to be true. You can specify multiple refine-edges using or-combinations. E.g., 'edgeMarks = (1<<i) | (1<<j)' would indicate that the i-th and the j-th edge shall be refined. |
int ug::tet_rules::Refine | ( | int * | newIndsOut, |
int * | newEdgeVrts, | ||
bool & | newCenterOut, | ||
vector3 * | corners = NULL , |
||
bool * | isSnapPoint = NULL |
||
) |
returns an array of integers, which contains the indices of the objects resulting from the refinement of a tetrahedron.
newIndsOut | Array which has to be of size MAX_NUM_INDS_OUT. When the algorithm is done, the array will contain sequences of integers: {{gridObjectID, ind1, ind2, ...}, ...}. gridObjectID is a constant enumerated in GridObjectID and describes the type of the grid-object that is built from the following set of corner indices. Old vertices are referenced by their local index. Vertices created on an edge are indexed by the index of the edge + NUM_VERTICES. If an inner vertex has to be created, it is referenced by NUM_VERTICES + NUM_EDGES + NUM_FACES. |
newEdgeVrts | Array of size NUM_EDGES, which has to contain 1 for each edge, which shall be refined and 0 for each edge, which won't be refined. |
newCenterOut | If the refinement-rule requires a center vertex, then this parameter will be set to true. If not, it is set to false. |
corners | (optional) List of the four corner positions of the tetrahedron. If it is specified, it is used during full refinement (all edges marked), to determine the best diagonal along which inner tetrahedrons are created. Corners are only considered during full refinement and are thus irrelevant during recursive refinement of other elements. |
isSnapPoint | (optional) An array of size NUM_VERTICES. If all entries are set to 'false' the behaviour is the same as if the array wasn't specified. If a corner of a quadrilateral is a snap-point and if edges of that quadrilateral are refined, then only new edges connected to the snap-point are introduced. Note that only special snap-point constellations are supported. |
References EDGE_FROM_VRTS, EDGE_VRT_INDS, FACE_CONTAINS_EDGE, FACE_EDGE_INDS, FACE_FROM_EDGES, FACE_FROM_VRTS, FACE_VRT_INDS, g_refinementRule, ug::GOID_OCTAHEDRON, ug::GOID_PRISM, ug::GOID_PYRAMID, ug::GOID_TETRAHEDRON, HYBRID_TET_OCT, InverseTetTransform(), NUM_EDGES, NUM_FACES, NUM_VERTICES, OPPOSED_EDGE, ug::shared_rules::RecursiveRefine(), STANDARD, TetRotation(), ug::VecAdd(), ug::VecDistanceSq(), and ug::VecScale().
void ug::tet_rules::SetRefinementRule | ( | GlobalRefinementRule | refRule | ) |
References g_refinementRule.
Referenced by ug::SetTetRefinementRule().
void ug::tet_rules::TetRotation | ( | int | vrtsInOut[NUM_VERTICES], |
const int | fixedPoint, | ||
const size_t | steps | ||
) |
Rotates the given tetrahedron while keeping the specified point fixed.
The face opposed to the fixed point is rotated in counter-clockwise order when viewed from the fixed point. e.g.
References FACE_VRT_INDS, and OPPOSED_OBJECT.
Referenced by Refine().
const int ug::tet_rules::EDGE_FROM_VRTS[4][4] |
Associates the index of the connecting edge with each tuple of vertices.
Use two vertex indices to index into this table to retrieve the index of their connecting edge.
Referenced by Refine().
const int ug::tet_rules::EDGE_VRT_INDS[][2] |
the local vertex indices of the given edge
Referenced by ug::IsSliver(), and Refine().
const int ug::tet_rules::FACE_CONTAINS_EDGE[][6] |
tells whether the i-th face contains the j-th edge
Referenced by Refine().
const int ug::tet_rules::FACE_EDGE_INDS[4][4] |
returns the j-th edge of the i-th face
Referenced by Refine().
const int ug::tet_rules::FACE_FROM_EDGES[][6] |
given two edges, the table returns the face, which contains both (or -1)
Referenced by Refine().
const int ug::tet_rules::FACE_FROM_VRTS[4][4][4] |
Associates the index of the connecting face with each triple of vertices.
Use three vertex indices to index into this table to retrieve the index of their connecting face.
Referenced by Refine().
const int ug::tet_rules::FACE_VRT_INDS[][4] |
the local vertex indices of the given face
Referenced by Refine(), and TetRotation().
|
static |
global refinement rule information switching between regular and subdivision volume refinement
Referenced by GetRefinementRule(), Refine(), and SetRefinementRule().
const int ug::tet_rules::MAX_NUM_INDS_OUT = 64 |
const int ug::tet_rules::NUM_EDGES = 6 |
Referenced by ug::IsSliver(), and Refine().
const int ug::tet_rules::NUM_FACES = 4 |
Referenced by Refine().
const int ug::tet_rules::NUM_QUADS = 0 |
const int ug::tet_rules::NUM_TRIS = 4 |
const int ug::tet_rules::NUM_VERTICES = 4 |
Referenced by InverseTetTransform(), and Refine().
const int ug::tet_rules::OPPOSED_EDGE[] = {5, 3, 4, 1, 2, 0} |
for each edge the local index of the opposed edge
Referenced by ug::IntersectPlaneWithTetrahedron(), ug::IsSliver(), and Refine().
const int ug::tet_rules::OPPOSED_OBJECT[][NUM_VERTICES] = {{2, 1}, {2, 2}, {2, 3}, {2, 0}} |
for each vertex, a pair containing the object type (0: vrt, 1: edge, 2: face) and an index into the associated array, which describe the object which lies on the opposite side of the tetrahedron, to a given vertex.
Referenced by TetRotation().