#include <mdsDelaunayTetra.h>
Inheritance diagram for mds::seg::CDelaunayTetra:
Class providing Delaunay triangulation in 3D space.
Public Types | |
enum | { XMIN_BOUNDARY = 1 << 4, YMIN_BOUNDARY = 1 << 5, ZMIN_BOUNDARY = 1 << 6, XMAX_BOUNDARY = 1 << 7, YMAX_BOUNDARY = 1 << 8, ZMAX_BOUNDARY = 1 << 9, BOUNDARY_FLAGS } |
Flags used to mark boundary vertices. More... | |
typedef bool(* | tConstraintFunc )(vctl::MCPoint3D *p1, vctl::MCPoint3D *p2, vctl::MCPoint3D *p3, CDelaunayTetra *pMesh) |
Function called to check constrained facets. | |
typedef bool(* | tMinEdgeLengthFunc )(vctl::MCPoint3D *p1, vctl::MCPoint3D *p2, CDelaunayTetra *pMesh) |
Function called to check minimal allowed edge length. | |
typedef mds::base::CSharedPtr< CDelaunayTetra > | tSmartPtr |
Smart pointer type. | |
typedef void(* | tTetrahedronFunc )(vctl::MCTetra *pTetrahedron, CDelaunayTetra *pMesh) |
Tetrahedron processing function. | |
Public Member Functions | |
bool | addVertex (vctl::MCVertex *pVertex, int iBoundaryVertex=0, tTetrahedronFunc InsertFunc=NULL, tTetrahedronFunc RemoveFunc=NULL) |
Inserts a new vertex to the current triangulation satisfying the Delaunay criterion. | |
virtual bool | attractVertex (vctl::MCPoint3D *pPoint) |
Modifies position of a given vertex. | |
CDelaunayTetra () | |
Default constructor. | |
void | clear () |
Removes all tetrahedra and vertices. | |
bool | construct () |
Constructs the Delaunay triangulation from all vertices which are currently registered in the container of vertices. | |
template<class S> | |
void | deserialize (mds::mod::CChannelSerializer< S > &Reader) |
Deserializes all class members the tetrahedron mesh. | |
template<class Function> | |
Function | forEachTetrahedron (Function Func) |
Calls function object for every tetrahedron in the mesh. | |
template<class Function> | |
Function | forEachVertex (Function Func) |
Calls function object for every vertex in the mesh. | |
vctl::MCTetra * | getFirstTetrahedron () |
Returns pointer to the first tetrahedron. | |
vctl::MCVertex * | getFirstVertex () |
Returns pointer to the first vertex. | |
bool | getMaxCoordinates (double &dX, double &dY, double &dZ) |
Estimates maximal vertex coordinates. | |
bool | getMinCoordinates (double &dX, double &dY, double &dZ) |
Estimates minimal vertex coordinates in the mesh. | |
double | getMinDihedralAngle () |
Returns current minimal allowed dihedral angle [degrees]. | |
double | getMinEdgeLength () |
Returns current minimal allowed edge length. | |
int | getNumOfTetrahedra () |
Returns the number of all tetrahedra. | |
int | getNumOfVertices () |
Returns the number of vertices. | |
vctl::MCTetraS * | getTetrahedra () |
Returns pointer to the container of tetrahedra. | |
vctl::MCVerticeS * | getVertices () |
Returns pointer to the vertices container. | |
bool | init (vctl::MCPoint3D *pMin, vctl::MCPoint3D *pMax, mds::tSize NumOfNodes=DEFAULT_NUMBER_OF_NODES) |
Initializes the Delaunay triangulation. | |
MDS_ENTITY_BLOCK_SIZE (4096) | |
Standard method getEntityBlockSize(). | |
MDS_ENTITY_COMPRESSION (mds::mod::CC_RAW) | |
Standard method getEntityCompression(). | |
MDS_ENTITY_NAME ("DelaunayTetra") | |
Standard method getEntityName(). | |
vctl::MCVertex * | newVertex (double x, double y, double z, int iFlags=0) |
Returns pointer to a newly created vertex. | |
vctl::MCVertex * | newVertex (vctl::MCPoint3D *pPoint, int iFlags=0) |
Returns pointer to a newly created vertex. | |
bool | optimizeByVertexAdding (double dMinQuality, bool bRandomPosition=true) |
Optimizes the triangulation. | |
vctl::MCVertex * | randomVertex (double x, double y, double z, double dMax=MAX_MOVEMENT) |
Generates randomly moved vertex. | |
vctl::MCVertex * | randomVertex (vctl::MCPoint3D *pPoint, double dMax=MAX_MOVEMENT) |
Generates randomly moved vertex. | |
template<class S> | |
void | serialize (mds::mod::CChannelSerializer< S > &Writer) |
Serializes the tetrahedron mesh. | |
void | setConstraintFunc (tConstraintFunc ConstraintFunc) |
Sets function called to check constrained facets. | |
void | setDefaultConstraintFunc () |
Sets default function for constrained facets checking. | |
void | setDefaultMinEdgeLengthFunc () |
Sets default function for checking minimal allowed edge length. | |
void | setMinDihedralAngle (double dValue=DEFAULT_MIN_DIHEDRAL_ANGLE) |
Sets minimal allowed dihedral angle in the triangulation [degrees]. | |
void | setMinEdgeLength (double dValue=DEFAULT_MIN_EDGE_LENGTH) |
Sets minimal allowed edge length in the triangulation. | |
void | setMinEdgeLengthFunc (tMinEdgeLengthFunc MinEdgeLengthFunc) |
Sets function for checking minimal allowed edge length. | |
virtual | ~CDelaunayTetra () |
Virtual destructor. | |
Static Public Attributes | |
static const double | DEFAULT_MIN_DIHEDRAL_ANGLE = 0.1 |
Minimal dihedral angle used to check tetrahedra flatness. | |
static const double | DEFAULT_MIN_EDGE_LENGTH = 1.5 |
Minimal length of a tetrahedron edge in the mesh. | |
static const mds::tSize | DEFAULT_NUMBER_OF_NODES = 5 |
Default methods parameters. | |
static const double | MAX_MOVEMENT = 0.001 |
Maximal allowed random permutation of vertex coordinates. | |
Protected Types | |
typedef std::vector< vctl::MCTetra * > | tTetrahedra |
Vector of pointers to tetrahedra. | |
typedef std::vector< vctl::MCVertex * > | tVertices |
Vector of pointers to vertices. | |
Protected Member Functions | |
vctl::MCTetra * | addTetrahedron (vctl::MCVertex *pV0, vctl::MCVertex *pV1, vctl::MCVertex *pV2, vctl::MCVertex *pV3) |
Creates a new tetrahedron. | |
int | checkBoundary (vctl::MCPoint3D *pPoint) |
Checks if a given vertex lies on the mesh boundary. | |
bool | checkFlatness (vctl::MCVertex *pV0, vctl::MCVertex *pV1, vctl::MCVertex *pV2, vctl::MCVertex *pV3) |
Checks if given vertices lie on a plane. | |
bool | checkTetrahedron (vctl::MCTetra *pTetrahedron) |
Checks if a tetrahedral mesh around a given tetrahedron is coherent. | |
void | clearFlags (const tTetrahedra &Tetrahedra) |
Clears entity flags of given tetrahedra. | |
void | clearFlags () |
Clears entity flags of all tetrahedra. | |
vctl::MCTetra * | findBaseTetrahedron (vctl::MCPoint3D *pPoint) |
Uses a simple recursive tunneling algorithm to find out tetrahedron in which a given point lies. | |
bool | findCavity (vctl::MCPoint3D *pPoint, tTetrahedra &Cavity) |
Finds cavity of a given point. | |
bool | findCavityEnvelope (const tTetrahedra &Cavity, tVertices &Envelope) |
Finds triangles covering a given cavity. | |
vctl::MCVertex * | findNearestVertex (vctl::MCPoint3D *pPoint, bool bStartFromPrevious=false) |
Finds nearest vertex. | |
void | removeTetrahedron (vctl::MCTetra *pTetrahedron, bool bEraseVertices=false) |
Removes a given existing tetrahedron. | |
Static Protected Member Functions | |
static double | getTetrahedronQuality (vctl::MCTetra *pTetrahedron) |
Computes tetrahedron quality. | |
Protected Attributes | |
tConstraintFunc | m_ConstraintFunc |
Function for checking if a given facet is constrained. | |
double | m_dMaxX |
Maximal vertex coordinates in the mesh. | |
double | m_dMaxY |
double | m_dMaxZ |
double | m_dMinDihedralAngle |
Minimal allowed dihedral angle. | |
double | m_dMinEdgeLength |
Minimal allowed edge length. | |
double | m_dMinX |
Minimal vertex coordinates in the mesh. | |
double | m_dMinY |
double | m_dMinZ |
tMinEdgeLengthFunc | m_MinEdgeLengthFunc |
Function for checking minimal length of an edge. | |
vctl::MCVerticeS * | m_pVertices |
Pointer to the container of vertices which is stored. | |
mds::math::CUniformPRNG | m_Random |
Random number generator. | |
vctl::MCTetraS | m_Tetrahedra |
Container of all tetrahedra in the mesh. | |
Friends | |
class | mds::base::CSharedPtr< CDelaunayTetra > |
|
Function called to check constrained facets.
|
|
Function called to check minimal allowed edge length.
|
|
Smart pointer type.
Reimplemented in mds::seg::CTetraMesh. |
|
Vector of pointers to tetrahedra.
|
|
Tetrahedron processing function.
|
|
Vector of pointers to vertices.
|
|
Flags used to mark boundary vertices.
|
|
Default constructor.
|
|
Virtual destructor.
|
|
Creates a new tetrahedron.
|
|
Inserts a new vertex to the current triangulation satisfying the Delaunay criterion.
|
|
Modifies position of a given vertex.
Reimplemented in mds::seg::CTetraMesh. |
|
Checks if a given vertex lies on the mesh boundary.
|
|
Checks if given vertices lie on a plane.
|
|
Checks if a tetrahedral mesh around a given tetrahedron is coherent.
|
|
Removes all tetrahedra and vertices.
|
|
Clears entity flags of given tetrahedra.
|
|
Clears entity flags of all tetrahedra.
|
|
Constructs the Delaunay triangulation from all vertices which are currently registered in the container of vertices.
|
|
Deserializes all class members the tetrahedron mesh.
Reimplemented in mds::seg::CTetraMesh. |
|
Uses a simple recursive tunneling algorithm to find out tetrahedron in which a given point lies.
|
|
Finds cavity of a given point.
|
|
Finds triangles covering a given cavity.
|
|
Finds nearest vertex.
|
|
Calls function object for every tetrahedron in the mesh.
|
|
Calls function object for every vertex in the mesh.
|
|
Returns pointer to the first tetrahedron.
|
|
Returns pointer to the first vertex.
|
|
Estimates maximal vertex coordinates.
|
|
Estimates minimal vertex coordinates in the mesh.
|
|
Returns current minimal allowed dihedral angle [degrees].
|
|
Returns current minimal allowed edge length.
|
|
Returns the number of all tetrahedra.
|
|
Returns the number of vertices.
|
|
Returns pointer to the container of tetrahedra.
|
|
Computes tetrahedron quality.
|
|
Returns pointer to the vertices container.
|
|
Initializes the Delaunay triangulation.
|
|
Standard method getEntityBlockSize().
Reimplemented in mds::seg::CTetraMesh. |
|
Standard method getEntityCompression().
Reimplemented in mds::seg::CTetraMesh. |
|
Standard method getEntityName().
|
|
Returns pointer to a newly created vertex.
|
|
Returns pointer to a newly created vertex.
|
|
Optimizes the triangulation.
|
|
Generates randomly moved vertex.
|
|
Generates randomly moved vertex.
|
|
Removes a given existing tetrahedron.
|
|
Serializes the tetrahedron mesh.
Reimplemented in mds::seg::CTetraMesh. |
|
Sets function called to check constrained facets.
|
|
Sets default function for constrained facets checking.
|
|
Sets default function for checking minimal allowed edge length.
|
|
Sets minimal allowed dihedral angle in the triangulation [degrees].
|
|
Sets minimal allowed edge length in the triangulation.
|
|
Sets function for checking minimal allowed edge length.
|
|
|
|
Minimal dihedral angle used to check tetrahedra flatness.
|
|
Minimal length of a tetrahedron edge in the mesh.
|
|
Default methods parameters.
|
|
Function for checking if a given facet is constrained.
|
|
Maximal vertex coordinates in the mesh.
|
|
|
|
|
|
Minimal allowed dihedral angle.
|
|
Minimal allowed edge length.
|
|
Minimal vertex coordinates in the mesh.
|
|
|
|
|
|
Function for checking minimal length of an edge.
|
|
Pointer to the container of vertices which is stored. in the container of vertices. |
|
Random number generator.
|
|
Container of all tetrahedra in the mesh.
|
|
Maximal allowed random permutation of vertex coordinates.
|