#include <delaunay_triangulation.h>
Public 型 | |
enum | ContainedType { NOT_CONTAINED, CONTAINED, ONLINE, SAME_VERTEX } |
typedef Edge * | EdgePtr |
typedef Triangle * | TrianglePtr |
Public メソッド | |
DelaunayTriangulation () | |
nothing to do | |
DelaunayTriangulation (const Rect2D ®ion) | |
construct with considerable rectangle region | |
~DelaunayTriangulation () | |
destruct | |
const std::vector< Vertex > & | vertices () const |
get vertices | |
const std::map< int, EdgePtr > & | edgeMap () const |
get edge set | |
const std::map< int, TrianglePtr > & | triangleMap () const |
get triangle set | |
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. | |
int | addVertex (const double &x, const double &y) |
add new vertex | |
int | addVertex (const Vector2D &p) |
add new vertex | |
const Vertex * | getVertex (const int id) const |
get the const pointer to vertex specified by Id number. | |
void | compute () |
compute the Delaunay Triangulation | |
const TrianglePtr | 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 Public 変数 | |
static const double | EPSILON |
構成 | |
class | Edge |
triangle's edge data. [詳細] | |
class | Triangle |
triangle data [詳細] | |
class | Vertex |
triangle's vertex data. This is handled as kernel point for the Voronoi diagram.. [詳細] |
rcsc::DelaunayTriangulation::DelaunayTriangulation | ( | const Rect2D & | region | ) | [inline, explicit] |
construct with considerable rectangle region
region | considerable rectangle region. |
const std::vector< Vertex >& rcsc::DelaunayTriangulation::vertices | ( | ) | const [inline] |
get vertices
const std::map< int, EdgePtr >& rcsc::DelaunayTriangulation::edgeMap | ( | ) | const [inline] |
get edge set
const std::map< int, TrianglePtr >& rcsc::DelaunayTriangulation::triangleMap | ( | ) | const [inline] |
get triangle set
int rcsc::DelaunayTriangulation::addVertex | ( | const double & | x, | |
const double & | y | |||
) | [inline] |
add new vertex
x | coordinate x | |
y | coordinate y |
int rcsc::DelaunayTriangulation::addVertex | ( | const Vector2D & | p | ) | [inline] |
add new vertex
p | added point |
const DelaunayTriangulation::Vertex * rcsc::DelaunayTriangulation::getVertex | ( | const int | id | ) | const |
get the const pointer to vertex specified by Id number.
id | wanted vertex Id number. |
const DelaunayTriangulation::TrianglePtr rcsc::DelaunayTriangulation::findTriangleContains | ( | const Vector2D & | pos | ) | const |
find triangle that contains pos from the computed triangle set.
pos | coordinates of the target point |
const DelaunayTriangulation::Vertex * rcsc::DelaunayTriangulation::findNearestVertex | ( | const Vector2D & | pos | ) | const |
find the vertex nearest to the specified point
pos | coordinates of the target point |