Fade2D Documentation pages v2.16.3
Delaunay Features
GEOM_FADE2D::VoroCell2 Class Reference

Voronoi cell. More...

#include <VoroCell2.h>

Public Member Functions

bool getAdjacentVCells (std::vector< VoroCell2 * > &vAdjacentCells) const
 
double getArea () const
 
bool getBoundaryPoints (std::vector< Point2 > &vPoints, std::vector< Vector2 > *pvInfiniteDirections=NULL) const
 
double getCentroid (Point2 &centroid) const
 
int getCustomCellIndex () const
 
bool getIncidentTriangles (std::vector< Triangle2 * > &vIncTriangles) const
 
bool getNeighborSites (std::vector< Point2 * > &vSites) const
 
Point2getSite () const
 
bool getVoronoiVertices (std::vector< VoroVertex2 * > &vVoroVertices) const
 
bool isFinite () const
 
void setCustomCellIndex (int customCellIndex_)
 

Detailed Description

Voronoi cell.

This class represents a Voronoi cell. A Voronoi cell corresponds to a certain site which is also a vertex of the dual Delaunay triangulation.

Member Function Documentation

◆ getAdjacentVCells()

bool GEOM_FADE2D::VoroCell2::getAdjacentVCells ( std::vector< VoroCell2 * > &  vAdjacentCells) const

Get adjacent Voronoi cells

Parameters
vAdjacentCellsis used to return the neighbor cells in counterclockwise order.
Returns
whether the cell is finite.

◆ getArea()

double GEOM_FADE2D::VoroCell2::getArea ( ) const

Get the area

Returns
the area of the cell if it is finite or -1.0 for an infinite cell.

◆ getBoundaryPoints()

bool GEOM_FADE2D::VoroCell2::getBoundaryPoints ( std::vector< Point2 > &  vPoints,
std::vector< Vector2 > *  pvInfiniteDirections = NULL 
) const

Get boundary points

Use this method to retrieve the Voronoi vertices of the present cell as Point2.

Parameters
[out]vPointscontains the boundary points in counterclockwise order.
[out]pvInfiniteDirectionscan optionally be used to retrieve the directions of the infinite Voronoi edges: When a pointer to a vector is provided for pvInfiniteDirections and the cell is finite, then the first stored Vector2 describes the direction of the infinite edge at vPoints[0] and the second one the direction of the infinite edge at vPoints.back().
Returns
whether the cell is finite
See also
getVoronoiVertices()

◆ getCentroid()

double GEOM_FADE2D::VoroCell2::getCentroid ( Point2 centroid) const

Get the centroid and area

Parameters
[out]centroid
Returns
the area of the cell if it is finite OR -1.0 for an infinite cell.

◆ getCustomCellIndex()

int GEOM_FADE2D::VoroCell2::getCustomCellIndex ( ) const

Get custom cell-index

Returns
the custom cell index that has been set before or -1 when no custom cell index has been set.
See also
setCustomCellIndex()

◆ getIncidentTriangles()

bool GEOM_FADE2D::VoroCell2::getIncidentTriangles ( std::vector< Triangle2 * > &  vIncTriangles) const

Get incident triangles

The site of the present Voronoi cell is also a vertex of the dual Delaunay triangulation.

Parameters
vIncTrianglesis used to return the the Delaunay triangles incident to the site of the cell in counterclockwise order.
Returns
whether the cell is finite.

◆ getNeighborSites()

bool GEOM_FADE2D::VoroCell2::getNeighborSites ( std::vector< Point2 * > &  vSites) const

Get neighbor sites

Parameters
vSitesis used to return the sites of the adjacent cells in counterclockwise order.
Returns
whether the cell is finite.

◆ getSite()

Point2* GEOM_FADE2D::VoroCell2::getSite ( ) const

Get site

Returns
the site of the cell, which is also a vertex of the dual Delaunay triangulation

◆ getVoronoiVertices()

bool GEOM_FADE2D::VoroCell2::getVoronoiVertices ( std::vector< VoroVertex2 * > &  vVoroVertices) const

Get Voronoi vertices

Used to retrieve the Voronoi vertices of the cell.

Parameters
[out]vVoroVerticescontains VoroVertex2 objects in counterclockwise order.
Returns
whether the cell is finite
See also
getBoundaryPoints()

◆ isFinite()

bool GEOM_FADE2D::VoroCell2::isFinite ( ) const

Is finite cell

Returns
whether the cell is finite

◆ setCustomCellIndex()

void GEOM_FADE2D::VoroCell2::setCustomCellIndex ( int  customCellIndex_)

Set custom cell-index

Use this method to associate Voronoi cells with your own data structures or to assign labels for a visualization.

Parameters
customCellIndex_is an arbitrary integer
See also
getCustomCellIndex()

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