Delaunay triangulation.
More...
#include <delaunay_triangulation.h>
|
| enum | ContainedType { NOT_CONTAINED
, CONTAINED
, ONLINE
, SAME_VERTEX
} |
| | containment type in triangles
|
|
typedef Edge * | EdgePtr |
| | alias of Edge pointer
|
|
typedef Triangle * | TrianglePtr |
| | alias of Triangle pointer
|
|
typedef std::vector< Vertex > | VertexCont |
| | vertex container type
|
|
typedef std::map< int, EdgePtr > | EdgeCont |
| | edge pointer container type
|
|
typedef std::map< int, TrianglePtr > | TriangleCont |
| | triangle pointer container type
|
|
|
| DelaunayTriangulation () |
| | nothing to do
|
| | DelaunayTriangulation (const Rect2D ®ion) |
| | construct with considerable rectangle region
|
|
| ~DelaunayTriangulation () |
| | destruct
|
|
void | init (const Rect2D ®ion) |
| | initialize with target field rectangle data. All data are cleared. Initial triangle is crated.
|
|
void | clear () |
| | clear all vertices and all computed results.
|
|
void | clearResults () |
| | clear all computed results
|
| const VertexCont & | vertices () const |
| | get vertices
|
| const EdgeCont & | edges () const |
| | get edge set
|
| const TriangleCont & | triangles () const |
| | get triangle set
|
| int | addVertex (const double &x, const double &y) |
| | add new vertex
|
| int | addVertex (const Vector2D &p) |
| | add new vertex
|
| void | addVertices (const std::vector< Vector2D > &v) |
| | set vertices.
|
| const Vertex * | getVertex (const int id) const |
| | get the const pointer to vertex specified by Id number.
|
|
void | compute () |
| | compute the Delaunay Triangulation
|
|
void | updateVoronoiVertex () |
| | calculate voronoi vertex point for each triangle
|
| const Triangle * | findTriangleContains (const Vector2D &pos) const |
| | find triangle that contains pos from the computed triangle set.
|
| const Vertex * | findNearestVertex (const Vector2D &pos) const |
| | find the vertex nearest to the specified point
|
|
|
static const double | EPSILON = 1.0e-10 |
| | tolerance threshold
|
◆ DelaunayTriangulation()
| rcsc::DelaunayTriangulation::DelaunayTriangulation |
( |
const Rect2D & | region | ) |
|
|
inlineexplicit |
construct with considerable rectangle region
- Parameters
-
| region | considerable rectangle region. |
All verteices must be included in region.
◆ addVertex() [1/2]
| int rcsc::DelaunayTriangulation::addVertex |
( |
const double & | x, |
|
|
const double & | y ) |
add new vertex
- Parameters
-
| x | coordinate x |
| y | coordinate y |
- Returns
- assigned id value
◆ addVertex() [2/2]
| int rcsc::DelaunayTriangulation::addVertex |
( |
const Vector2D & | p | ) |
|
|
inline |
add new vertex
- Parameters
-
- Returns
- assigned id value
◆ addVertices()
| void rcsc::DelaunayTriangulation::addVertices |
( |
const std::vector< Vector2D > & | v | ) |
|
◆ edges()
| const EdgeCont & rcsc::DelaunayTriangulation::edges |
( |
| ) |
const |
|
inline |
get edge set
- Returns
- const referenct to the map container. key=id, value=raw pointer
◆ findNearestVertex()
find the vertex nearest to the specified point
- Parameters
-
| pos | coordinates of the target point |
- Returns
- const pointer to the found vertex, if no vertex, NULL is returned.
◆ findTriangleContains()
find triangle that contains pos from the computed triangle set.
- Parameters
-
| pos | coordinates of the target point |
- Returns
- const pointer to the found triangle. if no triangle, NULL is returned.
◆ getVertex()
get the const pointer to vertex specified by Id number.
- Parameters
-
| id | wanted vertex Id number. |
- Returns
- const pointer to the vertex instance. if no vertex, NULL is returned.
◆ triangles()
| const TriangleCont & rcsc::DelaunayTriangulation::triangles |
( |
| ) |
const |
|
inline |
get triangle set
- Returns
- const referenct to the map container. key=id, value=raw pointer
◆ vertices()
| const VertexCont & rcsc::DelaunayTriangulation::vertices |
( |
| ) |
const |
|
inline |
get vertices
- Returns
- const reference to the vertices container
The documentation for this class was generated from the following files: