クラス rcsc::DelaunayTriangulation

Delaunay triangulation [詳細]

#include <delaunay_triangulation.h>

すべてのメンバ一覧

Public 型

enum  ContainedType { NOT_CONTAINED, CONTAINED, ONLINE, SAME_VERTEX }
typedef EdgeEdgePtr
typedef TriangleTrianglePtr

Public メソッド

 DelaunayTriangulation ()
 nothing to do
 DelaunayTriangulation (const Rect2D &region)
 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 &region)
 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 VertexgetVertex (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 VertexfindNearestVertex (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.. [詳細]


説明

Delaunay triangulation


コンストラクタとデストラクタ

rcsc::DelaunayTriangulation::DelaunayTriangulation ( const Rect2D region  )  [inline, explicit]

construct with considerable rectangle region

引数:
region considerable rectangle region.
All verteices must be included in region.


関数

const std::vector< Vertex >& rcsc::DelaunayTriangulation::vertices (  )  const [inline]

get vertices

戻り値:
const reference to the vertices container

const std::map< int, EdgePtr >& rcsc::DelaunayTriangulation::edgeMap (  )  const [inline]

get edge set

戻り値:
const referenct to the map container. key=id, value=raw pointer

const std::map< int, TrianglePtr >& rcsc::DelaunayTriangulation::triangleMap (  )  const [inline]

get triangle set

戻り値:
const referenct to the map container. key=id, value=raw pointer

int rcsc::DelaunayTriangulation::addVertex ( const double &  x,
const double &  y 
) [inline]

add new vertex

引数:
x coordinate x
y coordinate y
戻り値:
assigned id value

int rcsc::DelaunayTriangulation::addVertex ( const Vector2D p  )  [inline]

add new vertex

引数:
p added point
戻り値:
assigned id value

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 pointer to the vertex instance. if no vertex, NULL is returned.

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 pointer to the found triangle. if no triangle, NULL is returned.

const DelaunayTriangulation::Vertex * rcsc::DelaunayTriangulation::findNearestVertex ( const Vector2D pos  )  const

find the vertex nearest to the specified point

引数:
pos coordinates of the target point
戻り値:
const pointer to the found vertex, if no vertex, NULL is returned.


このクラスの説明は次のファイルから生成されました:
librcscに対してThu May 1 15:41:26 2008に生成されました。  doxygen 1.5.0