HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_TetTetrahedron Class Reference

#include <UT_Tetrahedralize.h>

Public Member Functions

 UT_TetTetrahedron (UT_TetVertex *a, UT_TetVertex *b, UT_TetVertex *c, UT_TetVertex *d)
 
void addToVertices ()
 Calls UT_TetVertex::addTet on each of its vertices. More...
 
void setAdjacentOppositeVertex (const UT_TetVertex *v, UT_TetTetrahedron *tet)
 Updates the adjacency information for the face opposite vertex v. More...
 
UT_TetTetrahedronadjacentOppositeVertex (const UT_TetVertex *v) const
 
void updateAdjacency (const UT_TetVertex *v, UT_TetTetrahedron *tet)
 
UT_TetTetrahedronadjacentAtFace (const UT_TetFace &f) const
 Returns the tetrahedron adjacent to this one at the given face. More...
 
bool hasAdjacent (const UT_TetTetrahedron *tAdj) const
 Returns whether a particular tetrahedron is adjacent to this one. More...
 
void clearAdjacency (UT_TetTetrahedron *tAdj)
 Clears out any adjaceny pointers set to provided tetrahedron. More...
 
bool hasFace (const UT_TetFace &f) const
 
bool hasVertex (UT_TetVertex *v) const
 
bool hasAnyVertex (const UT_TetVertexArray &verts) const
 
bool vertexInside (const UT_TetVertex *v) const
 
bool delaunay () const
 
UT_TetVertexdistinctVertex (const UT_TetTetrahedron *tAdj) const
 Returns the first vertex in this that is not in provided tetrahedron. More...
 
UT_TetVertexdistinctVertex (const UT_TetFace &f) const
 Returns the first vertex in this that is not in the provided face. More...
 
UT_TetVertexvertex (unsigned int i) const
 Unchecked access to vertices,. More...
 
UT_TetTetrahedronadjacent (unsigned int i) const
 Unchecked access to adjacent tetrahedra,. More...
 
UT_TetFace face (unsigned int i) const
 
void setVisited (bool b)
 Visited flag. More...
 
bool visited () const
 

Detailed Description

The UT_TetTetrahedron class is the primary structure in the tetrahedralization process. It holds pointers to its four vertex objects, as well as to any adjacent tetrahedra. The convention is that a particular adjacent tetrahedra is stored with the same index as the face to which it is adjacent and the vertex from which it is opposite. In other words, adjacent(i) is adjacent to face(i), which is opposite vertex(i).

Several of the member functions are related to maintaining the adjacency relationships during the tetrahedralization process. They are called only from the various flip?? functions.

This class also holds a visited flag that is used to stop iterating during walks through adjacent tetrahedra in the walk function and the tetrahedralization function. This is faster than using something like hboost::unordered_set to keep track of visited tetrahedra at the expense of a small amount of memory.

Definition at line 100 of file UT_Tetrahedralize.h.

Constructor & Destructor Documentation

UT_TetTetrahedron::UT_TetTetrahedron ( UT_TetVertex a,
UT_TetVertex b,
UT_TetVertex c,
UT_TetVertex d 
)

Member Function Documentation

void UT_TetTetrahedron::addToVertices ( )

Calls UT_TetVertex::addTet on each of its vertices.

UT_TetTetrahedron* UT_TetTetrahedron::adjacent ( unsigned int  i) const
inline

Unchecked access to adjacent tetrahedra,.

Definition at line 148 of file UT_Tetrahedralize.h.

UT_TetTetrahedron* UT_TetTetrahedron::adjacentAtFace ( const UT_TetFace f) const

Returns the tetrahedron adjacent to this one at the given face.

UT_TetTetrahedron* UT_TetTetrahedron::adjacentOppositeVertex ( const UT_TetVertex v) const
void UT_TetTetrahedron::clearAdjacency ( UT_TetTetrahedron tAdj)

Clears out any adjaceny pointers set to provided tetrahedron.

bool UT_TetTetrahedron::delaunay ( ) const

Diagnostic function - should always return true when tet is locally delaunay with tetrahedralization.

UT_TetVertex* UT_TetTetrahedron::distinctVertex ( const UT_TetTetrahedron tAdj) const

Returns the first vertex in this that is not in provided tetrahedron.

UT_TetVertex* UT_TetTetrahedron::distinctVertex ( const UT_TetFace f) const

Returns the first vertex in this that is not in the provided face.

UT_TetFace UT_TetTetrahedron::face ( unsigned int  i) const

Returns face such that face(i) is opposite from vertex(i) and adjacent to adjacent(i).

bool UT_TetTetrahedron::hasAdjacent ( const UT_TetTetrahedron tAdj) const

Returns whether a particular tetrahedron is adjacent to this one.

bool UT_TetTetrahedron::hasAnyVertex ( const UT_TetVertexArray verts) const
bool UT_TetTetrahedron::hasFace ( const UT_TetFace f) const

Tests for the existence of a given face, vertex, any of a set of vertices.

bool UT_TetTetrahedron::hasVertex ( UT_TetVertex v) const
void UT_TetTetrahedron::setAdjacentOppositeVertex ( const UT_TetVertex v,
UT_TetTetrahedron tet 
)

Updates the adjacency information for the face opposite vertex v.

void UT_TetTetrahedron::setVisited ( bool  b)
inline

Visited flag.

Definition at line 154 of file UT_Tetrahedralize.h.

void UT_TetTetrahedron::updateAdjacency ( const UT_TetVertex v,
UT_TetTetrahedron tet 
)

Updates the adjacency information for the face opposite vertex v, and (if non-NULL) also updates the provided tetrahedron's adjacency to point to this tetrahedron.

UT_TetVertex* UT_TetTetrahedron::vertex ( unsigned int  i) const
inline

Unchecked access to vertices,.

Definition at line 146 of file UT_Tetrahedralize.h.

bool UT_TetTetrahedron::vertexInside ( const UT_TetVertex v) const
bool UT_TetTetrahedron::visited ( ) const
inline

Definition at line 155 of file UT_Tetrahedralize.h.


The documentation for this class was generated from the following file: