#include <mdsDelaunayTri.h>
Inheritance diagram for mds::seg::CDelaunayTri:

Class providing Delaunay triangulation.
Public Types | |
| enum | { XMIN_BOUNDARY = 16, YMIN_BOUNDARY = 32, XMAX_BOUNDARY = 64, YMAX_BOUNDARY = 128, BOUNDARY_FLAGS = XMIN_BOUNDARY | YMIN_BOUNDARY | XMAX_BOUNDARY | YMAX_BOUNDARY } |
| Flag used to mark boundary vertices. More... | |
| typedef mds::base::CSharedPtr< CDelaunayTri > | tSmartPtr |
| Smart pointer type. | |
| typedef void(* | tTriangleFunc )(vctl::MCTri *pTriangle, CDelaunayTri *pMesh) |
| Triangle processing function. | |
Public Member Functions | |
| bool | addVertex (vctl::MCVertex *pVertex, int bBoundaryVertex=0, tTriangleFunc InsertFunc=NULL, tTriangleFunc RemoveFunc=NULL) |
| Inserts a new vertex to the current triangulation satisfying the Delaunay criterion. | |
| CDelaunayTri () | |
| Default constructor. | |
| void | clear () |
| Removes all triangles and vertices. | |
| bool | construct () |
| Constructs 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 the triangular mesh. | |
| vctl::MCTri * | getFirstTriangle () |
Returns pointer to the first triangle
| |
| vctl::MCVertex * | getFirstVertex () |
Returns pointer to the first vertex
| |
| bool | getMaxCoordinates (double &dX, double &dY) |
| Estimates maximal vertex coordinates. | |
| bool | getMinCoordinates (double &dX, double &dY) |
| Estimates minimal vertex coordinates in the mesh. | |
| int | getNumOfTriangles () |
| Returns the number of all triangles. | |
| int | getNumOfVertices () |
| Returns the number of vertices. | |
| vctl::MCTriS * | getTriangles () |
| Returns pointer to the vertices container. | |
| vctl::MCVerticeS * | getVertices () |
| Returns pointer to the vertices container. | |
| bool | init (vctl::MCPoint3D *pMin, vctl::MCPoint3D *pMax, mds::tSize NumOfNodes=DEFAULT_NUMBER_OF_NODES, double dMinEdgeLength=DEFAULT_MIN_EDGE_LENGTH) |
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 ("DelaunayTri") | |
| Standard method getEntityName(). | |
| vctl::MCVertex * | newVertex (vctl::MCPoint3D *pPoint) |
| vctl::MCVertex * | newVertex (double x, double y) |
| Returns pointer to a newly created vertex. | |
| bool | normalize (double dMinQuality, double dMinEdgeLength) |
Normalizes the triangular mesh
| |
| vctl::MCVertex * | randomVertex (double x, double y, 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 triangular mesh. | |
| virtual | ~CDelaunayTri () |
| Virtual destructor. | |
Static Public Attributes | |
| static const double | DEFAULT_MIN_EDGE_LENGTH = 1.0 |
| Minimal length of a triangle edge in the mesh. | |
| static const tSize | DEFAULT_NUMBER_OF_NODES = 7 |
| Default methods parameters. | |
| static const double | MAX_MOVEMENT = 0.5 |
| Maximal allowed random permutation of vertex coordinates. | |
Protected Types | |
| typedef std::vector< vctl::MCTri * > | tTriangles |
| Vector of pointers to triangles. | |
| typedef std::vector< vctl::MCVertex * > | tVertices |
| Vector of pointers to vertices. | |
Protected Member Functions | |
| vctl::MCTri * | addTriangle (vctl::MCVertex *pV0, vctl::MCVertex *pV1, vctl::MCVertex *pV2) |
Creates a new triangle
| |
| 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) |
| Checks if given vertices lie on a line. | |
| void | clearFlags (const tTriangles &Triangles) |
| Clears entity flags of given triangles. | |
| void | clearFlags () |
| Clears entity flags of all triangles. | |
| vctl::MCTri * | findBaseTriangle (vctl::MCPoint3D *pPoint) |
Uses a simple recursive tunneling algorithm to find out triangle in which a given point lies
| |
| bool | findCavity (vctl::MCPoint3D *pPoint, tTriangles &Cavity) |
Finds cavity of a given point
| |
| bool | findCavityEnvelope (const tTriangles &Cavity, tVertices &Envelope) |
Finds edges covering a given cavity
| |
| void | removeTriangle (vctl::MCTri *pTriangle, bool bEraseVertices=false) |
| Removes a given existing triangle. | |
Protected Attributes | |
| double | m_dMaxX |
| Maximal vertex coordinates in the mesh. | |
| double | m_dMaxY |
| double | m_dMinX |
| Minimal vertex coordinates in the mesh. | |
| double | m_dMinY |
| vctl::MCVerticeS * | m_pVertices |
| Pointer to the container of vertices which is stored in the triangular mesh. | |
| mds::math::CUniformPRNG | m_Random |
| Random number generator. | |
| vctl::MCTriS | m_Triangles |
| Container of all triangles in the mesh. | |
Friends | |
| class | mds::base::CSharedPtr< CDelaunayTri > |
|
|
Smart pointer type.
Reimplemented in mds::seg::CTriMesh. |
|
|
Triangle processing function.
|
|
|
Vector of pointers to triangles.
|
|
|
Vector of pointers to vertices.
|
|
|
Flag used to mark boundary vertices.
|
|
|
Default constructor.
|
|
|
Virtual destructor.
|
|
||||||||||||||||
|
Creates a new triangle
|
|
||||||||||||||||||||
|
Inserts a new vertex to the current triangulation satisfying the Delaunay criterion.
|
|
|
Checks if a given vertex lies on the mesh boundary.
|
|
||||||||||||||||
|
Checks if given vertices lie on a line.
|
|
|
Removes all triangles and vertices.
|
|
|
Clears entity flags of given triangles.
|
|
|
Clears entity flags of all triangles.
|
|
|
Constructs Delaunay triangulation from all vertices which are currently registered in the container of vertices.
|
|
||||||||||
|
Deserializes the triangular mesh.
Reimplemented in mds::seg::CTriMesh. |
|
|
Uses a simple recursive tunneling algorithm to find out triangle in which a given point lies
|
|
||||||||||||
|
Finds cavity of a given point
This flag is not cleared after the cavity is found.
|
|
||||||||||||
|
Finds edges covering a given cavity
This flag is cleared after the envelope is found.
|
|
|
Returns pointer to the first triangle
|
|
|
Returns pointer to the first vertex
|
|
||||||||||||
|
Estimates maximal vertex coordinates.
|
|
||||||||||||
|
Estimates minimal vertex coordinates in the mesh.
|
|
|
Returns the number of all triangles.
|
|
|
Returns the number of vertices.
|
|
|
Returns pointer to the vertices container.
|
|
|
Returns pointer to the vertices container.
|
|
||||||||||||||||||||
|
Initializes the Delaunay triangulation
|
|
|
Standard method getEntityBlockSize().
Reimplemented in mds::seg::CTriMesh. |
|
|
Standard method getEntityCompression().
Reimplemented in mds::seg::CTriMesh. |
|
|
Standard method getEntityName().
|
|
|
|
|
||||||||||||
|
Returns pointer to a newly created vertex.
|
|
||||||||||||
|
Normalizes the triangular mesh
|
|
||||||||||||||||
|
Generates randomly moved vertex.
|
|
||||||||||||
|
Generates randomly moved vertex.
|
|
||||||||||||
|
Removes a given existing triangle.
|
|
||||||||||
|
Serializes the triangular mesh.
Reimplemented in mds::seg::CTriMesh. |
|
|
|
|
|
Minimal length of a triangle edge in the mesh.
|
|
|
Default methods parameters.
|
|
|
Maximal vertex coordinates in the mesh.
|
|
|
|
|
|
Minimal vertex coordinates in the mesh.
|
|
|
|
|
|
Pointer to the container of vertices which is stored in the triangular mesh.
|
|
|
Random number generator.
|
|
|
Container of all triangles in the mesh.
|
|
|
Maximal allowed random permutation of vertex coordinates.
|
1.4.6-NO