#include <delaunator.h>
Public Member Functions | |
Delaunator (const float, const float, const float, const float, const VertexFinderMode=VERTEX_FINDER_MODE_LAST) | |
~Delaunator () | |
VirtualVertex * | addVirtualVertex (Coordinates) |
VirtualVertex * | addVirtualVertex (float, float) |
void | delVirtualVertex (VirtualVertex *) |
VirtualVertex * | movVirtualVertex (VirtualVertex *, Coordinates) |
VirtualVertex * | movVirtualVertex (VirtualVertex *, float, float) |
VirtualVertex * | virtualVertexAt (Coordinates, float=EPSILON) const |
VirtualVertex * | virtualVertexAt (float, float, float=EPSILON) const |
std::list< VirtualVertex * > | virtualVerticesAt (Coordinates, float=EPSILON) const |
std::list< VirtualVertex * > | virtualVerticesAt (float, float, float=EPSILON) const |
unsigned int | objectCount () const |
float | getXmin () const |
float | getXmax () const |
float | getYmin () const |
float | getYmax () const |
float | epsilon () const |
float | distanceMax () const |
bool | haveVertex (Vertex *) const |
bool | collideAt (Coordinates) const |
bool | opt_isdebug () const |
bool | opt_follow_search () const |
std::list< VirtualVertex * > | virtualVertices () const |
Delaunay class definition. Provide iterators, access to VirtualVertexs… Have all methods for add, delete and move Objects.
Delaunator::Delaunator | ( | const float | xmin, |
const float | xmax, | ||
const float | ymin, | ||
const float | ymax, | ||
const VertexFinderMode | finder_mode = VERTEX_FINDER_MODE_LAST |
||
) |
Wait for limits of triangulation in axis x and y.
xmin | minimal value in x axis allowed |
xmax | maximal value in x axis allowed |
ymin | minimal value in y axis allowed |
ymax | maximal value in y axis allowed |
finder_mode | for choose which mode of finder will be used for search Coordinates, LAST by default |
Delaunator::~Delaunator | ( | ) |
Frees
VirtualVertex * Delaunator::addVirtualVertex | ( | Coordinates | coords | ) |
Place an object in the triangulation, at the given coords
coords | place where object will be |
VirtualVertex * Delaunator::addVirtualVertex | ( | float | x, |
float | y | ||
) |
Place an object in the triangulation, at the given coords
x | coordinate in x-axis |
y | coordinate in y-axis |
bool Delaunator::collideAt | ( | Coordinates | c | ) | const |
c | Coordinates of tested point |
void Delaunator::delVirtualVertex | ( | VirtualVertex * | obj | ) |
Remove given object of the triangulation.
obj | a VirtualVertex that have been added before |
float Delaunator::distanceMax | ( | ) | const |
bool Delaunator::haveVertex | ( | Vertex * | v | ) | const |
VirtualVertex * Delaunator::movVirtualVertex | ( | VirtualVertex * | obj, |
Coordinates | relative_move | ||
) |
Move given object by given values. (relative move)
obj | a VirtualVertex that have been added before |
relative_move | used for movement |
VirtualVertex * Delaunator::movVirtualVertex | ( | VirtualVertex * | obj, |
float | rel_x, | ||
float | rel_y | ||
) |
Move given object by given values. (relative move)
obj | a VirtualVertex that have been added before |
rel_x | relative move in x-axis |
rel_y | relative move in y-axis |
|
inline |
VirtualVertex * Delaunator::virtualVertexAt | ( | Coordinates | coords, |
float | precision = EPSILON |
||
) | const |
coords | Coordinates where looking for |
VirtualVertex * Delaunator::virtualVertexAt | ( | float | x, |
float | y, | ||
float | precision = EPSILON |
||
) | const |
x | coord in x-axis where looking for |
y | coord in y-axis where looking for |
std::list< VirtualVertex * > Delaunator::virtualVerticesAt | ( | Coordinates | coords, |
float | precision = EPSILON |
||
) | const |
coords | Coordinates where looking for |
std::list< VirtualVertex * > Delaunator::virtualVerticesAt | ( | float | x, |
float | y, | ||
float | precision = EPSILON |
||
) | const |
x | coord in x-axis where looking for |
y | coord in y-axis where looking for |