|
Rumba C++ SDK
|
A 2D Delaunay triangulation. More...
#include <Delaunay.h>
Public Member Functions | |
| DelaunayTriangulation2D () | |
| Create an empty DelaunayTriangulation2D. More... | |
| DelaunayTriangulation2D (const std::vector< Imath::V2d > &points) | |
| bool | is_inside_super_triangle (const Imath::V2d &p) |
| Returns true if the point lies inside the initial super triangle, false otherwise. More... | |
| bool | insert (const Imath::V2d &p) |
| std::vector< Imath::V2d > | points () const |
| Returns the set of points. More... | |
| const std::vector< int > & | convex_hull () const |
| const std::vector< Imath::V3i > & | triangulation () const |
| std::vector< std::pair< int, double > > | nnc (const Imath::V2d &p) const |
Static Public Member Functions | |
| static bool | is_in_circumcircle (const Imath::V2d &p, const Imath::V2d &a, const Imath::V2d &b, const Imath::V2d &c) |
| Returns the voronoi diagram of the set of points. More... | |
A 2D Delaunay triangulation.
This class performs the Bowyer-Watson algorithm to compute the Delaunay triangulation of a set of 2D points.
| maquina::DelaunayTriangulation2D::DelaunayTriangulation2D | ( | ) |
Create an empty DelaunayTriangulation2D.
| maquina::DelaunayTriangulation2D::DelaunayTriangulation2D | ( | const std::vector< Imath::V2d > & | points | ) |
Create a DelaunayTriangulation2D from the given 2D points.
| const std::vector<int>& maquina::DelaunayTriangulation2D::convex_hull | ( | ) | const |
Returns the convex_hull of the set of points as a polygon.
| bool maquina::DelaunayTriangulation2D::insert | ( | const Imath::V2d & | p | ) |
Inserts the given point to the Delaunay Triangulation. Returns true if the point has been inserted, false otherwise.
|
static |
Returns the voronoi diagram of the set of points.
Returns true if p lies in the circumcircle of triangle abc, false otherwise.
| bool maquina::DelaunayTriangulation2D::is_inside_super_triangle | ( | const Imath::V2d & | p | ) |
Returns true if the point lies inside the initial super triangle, false otherwise.
| std::vector<std::pair<int, double> > maquina::DelaunayTriangulation2D::nnc | ( | const Imath::V2d & | p | ) | const |
Computes the natural_neighbor_coordinates of the query point. Returns a map associating each natural neighbor's index with the corresponding coordinate.
| std::vector<Imath::V2d> maquina::DelaunayTriangulation2D::points | ( | ) | const |
Returns the set of points.
| const std::vector<Imath::V3i>& maquina::DelaunayTriangulation2D::triangulation | ( | ) | const |
Returns the result of the triangulation as a list of triangles.