(Constrained Delaunay) triangulation class
More...
#include <triangulation.h>
|
|
typedef std::vector< Vector2D > | PointCont |
| | point container type.
|
|
typedef std::vector< Triangle > | TriangleCont |
| | triangle container type.
|
|
typedef std::pair< size_t, size_t > | Segment |
| | segment edge type.
|
|
typedef std::set< Segment > | SegmentSet |
| | segment edge set type.
|
|
typedef std::vector< Segment > | SegmentCont |
| | segment edge container type.
|
|
|
| Triangulation () |
| | create null triangulation object.
|
|
void | clear () |
| | clear all data.
|
|
void | clearResults () |
| | clear result data.
|
| const PointCont & | points () const |
| | get input point container.
|
| const SegmentSet & | constraints () const |
| | get constrained edges.
|
| const TriangleCont & | triangles () const |
| | get result triangle set.
|
| const SegmentCont & | edges () const |
| | get result triangle edges.
|
| void | setUseTriangles (const bool on) |
| | set use_triangles property.
|
| void | setUseEdges (const bool on) |
| | set use_triangles property.
|
| bool | addPoint (const Vector2D &p) |
| | add point to the input point container.
|
| size_t | addPoints (const PointCont &v) |
| | add points to the input point container.
|
| bool | addConstraint (const size_t &origin_index, const size_t &terminal_index) |
| | add constraint point indices for Constrained Delaunay triangulation.
|
|
void | compute () |
| | generates triangulation.
|
| const Triangle * | findTriangleContains (const Vector2D &point) const |
| | find the triangle contanes the input point.
|
| int | findNearestPoint (const Vector2D &point) const |
| | find the point nearest to the input point.
|
(Constrained Delaunay) triangulation class
◆ addConstraint()
| bool rcsc::Triangulation::addConstraint |
( |
const size_t & | origin_index, |
|
|
const size_t & | terminal_index ) |
add constraint point indices for Constrained Delaunay triangulation.
- Parameters
-
| origin_index | index of first point |
| terminal_index | index of second point |
◆ addPoint()
| bool rcsc::Triangulation::addPoint |
( |
const Vector2D & | p | ) |
|
add point to the input point container.
- Parameters
-
- Returns
- result of adding operation.
◆ addPoints()
| size_t rcsc::Triangulation::addPoints |
( |
const PointCont & | v | ) |
|
add points to the input point container.
- Parameters
-
- Returns
- size of successfully added points.
◆ constraints()
| const SegmentSet & rcsc::Triangulation::constraints |
( |
| ) |
const |
|
inline |
get constrained edges.
- Returns
- const reference to the segment container.
◆ edges()
| const SegmentCont & rcsc::Triangulation::edges |
( |
| ) |
const |
|
inline |
get result triangle edges.
- Returns
- const reference to the segment container.
◆ findNearestPoint()
| int rcsc::Triangulation::findNearestPoint |
( |
const Vector2D & | point | ) |
const |
find the point nearest to the input point.
- Parameters
-
- Returns
- index of the nearest point. if not found, returns -1.
◆ findTriangleContains()
| const Triangle * rcsc::Triangulation::findTriangleContains |
( |
const Vector2D & | point | ) |
const |
find the triangle contanes the input point.
- Parameters
-
- Returns
- pointer to the triangle. if not found, returns NULL.
◆ points()
| const PointCont & rcsc::Triangulation::points |
( |
| ) |
const |
|
inline |
get input point container.
- Returns
- const reference to the point container.
◆ setUseEdges()
| void rcsc::Triangulation::setUseEdges |
( |
const bool | on | ) |
|
|
inline |
set use_triangles property.
- Parameters
-
◆ setUseTriangles()
| void rcsc::Triangulation::setUseTriangles |
( |
const bool | on | ) |
|
|
inline |
set use_triangles property.
- Parameters
-
◆ triangles()
| const TriangleCont & rcsc::Triangulation::triangles |
( |
| ) |
const |
|
inline |
get result triangle set.
- Returns
- const reference to the triangle container.
The documentation for this class was generated from the following file: