Geom Software - C++ Programming and Geometry Libraries
Fade3D Documentation pages v0.99
FADE3D::Fade_3D Class Reference

3D Delaunay triangulation - the main class More...

#include <Fade_3D.h>

Public Member Functions

void getTetsAroundVertex (Point3 *pVtx, std::vector< Tet3 *> &vTetOut)
 Get all tetrahedra around a vertex. More...
bool checkValidity (const std::string &msg, bool bCheckSphereInc)
 Check validity of the tetrahedral mesh. More...
void show (const std::string &filename, Point3 *pVtx=NULL)
 Draw a 3D scene. More...
Point3insert (Point3 &p)
 Insert a single 3D point. More...
void insert (std::vector< Point3 > &vInputPoints)
 Insert a vector of 3D points. More...
void insert (std::vector< Point3 > &vInputPoints, std::vector< Point3 *> &vHandlesOut)
 Insert 3D points from vInputPoints and store pointers in vHandles. More...
Tet3locate (const Point3 &p)
 Locate a tetrahedron which contains p The Fade_3D class can be used as a data structure for point location. This method returns a pointer to a tetrahedron which contains p. More...
void getTetrahedra (std::vector< Tet3 *> &vTetrahedra) const
 Get all Tet3 (tetrahedra) More...
void getVertices (std::vector< Point3 *> &vVertices) const
 Get all vertices. More...
bool is3D () const
 Check if the triangulation is 3D. More...

Static Public Member Functions

static void printLicense ()
 Print your license type.

Detailed Description

Fade_3D represents a 3D Delaunay triangulation (tetrahedralization)

Member Function Documentation

◆ checkValidity()

bool FADE3D::Fade_3D::checkValidity ( const std::string &  msg,
bool  bCheckSphereInc 

This is a debug method, primary ment for internal use to check if the internal data strucutre is valid. It may be time-consuming. Don't use this method unless you assume that something is wrong.

msgis a debug string that will be shown when the check fails
bCheckSphereIncspecifies if the empty sphere property shall be checked also

◆ getTetrahedra()

void FADE3D::Fade_3D::getTetrahedra ( std::vector< Tet3 *> &  vTetrahedra) const
[out]vTetrahedrais used to return Tet3 pointers.

◆ getTetsAroundVertex()

void FADE3D::Fade_3D::getTetsAroundVertex ( Point3 pVtx,
std::vector< Tet3 *> &  vTetOut 
[in]pVtxis the query vertex
[out]vTetOutis used to return the incident tetrahedra

◆ getVertices()

void FADE3D::Fade_3D::getVertices ( std::vector< Point3 *> &  vVertices) const
[out]vVerticesis used to return Point3 pointers. The order does not necessrily coincide with the insertion order.
When duplicate points are inserted then only one copy is made and consequently only one vertex pointer is returned for them. Thus the number of points returned by the present method can be smaller than the number of inserted points.

◆ insert() [1/3]

Point3* FADE3D::Fade_3D::insert ( Point3 p)
pis the point to be inserted.

The triangulation keeps a copy of p and returns a pointer to this copy. If duplicate points are inserted the returned pointer is always the same (the one of the very first insertion).

a pointer to the point in the triangulation
This method is fast but it is even faster to pass all points at once if possible. See void insert(const std::vector<Point3>& vInputPoints)

◆ insert() [2/3]

void FADE3D::Fade_3D::insert ( std::vector< Point3 > &  vInputPoints)
vInputPointscontains the points to be inserted.

◆ insert() [3/3]

void FADE3D::Fade_3D::insert ( std::vector< Point3 > &  vInputPoints,
std::vector< Point3 *> &  vHandlesOut 
[in]vInputPointscontains the points to be inserted.
[out]vHandlesOut(empty) is used to return Point3 pointers

Internally, the triangulation keeps copies of the inserted points which are returned in vHandles (in the same order). If duplicate points are contained in vInputPoints then only one copy will be made and a pointer to this unique copy will be stored in vHandles for every occurance.

◆ is3D()

bool FADE3D::Fade_3D::is3D ( ) const

Check if the triangulation containts tetrahedra. This is the case if at least 4 non-coplanar vertices exist.

◆ locate()

Tet3* FADE3D::Fade_3D::locate ( const Point3 p)
pis the query point
a pointer to a Tet3 object (or NULL if is3D()==false or if p is outside the triangulation)

◆ show()

void FADE3D::Fade_3D::show ( const std::string &  filename,
Point3 pVtx = NULL 

This method draws all tetrahedra. The output is a *.list file for Geomview

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