|
libosmscout 0.1
|
Triangulation of the polygons a renderer draws. More...
#include <Triangulate.h>
Static Public Member Functions | |
| static std::vector< GLfloat > | TriangulatePolygon (std::vector< osmscout::GeoCoord > points) |
| Triangulate a polygon without hole. | |
| static std::vector< GLfloat > | TriangulatePolygon (std::vector< osmscout::Point > points) |
| Triangulate a polygon without hole. | |
| static std::vector< GLfloat > | TriangulatePolygon (std::vector< osmscout::Vertex2D > points) |
| Triangulate a polygon without hole. | |
| static std::vector< GLfloat > | TriangulateWithHoles (std::vector< std::vector< osmscout::Point > > points) |
| Triangulate a polygon with hole. | |
Triangulation of the polygons a renderer draws.
Exported like the backend's other free functions (AreaVisibility.h), so a caller outside this library - and its tests - can reach it.
A polygon is normalized before it is triangulated: a point that repeats its predecessor, a closing point that repeats the first point and a point that is no corner of the ring are removed, so input that repeats a point is triangulated rather than rejected.
A polygon the triangulation cannot handle - fewer than three distinct corners remain, or the vendored triangulator refuses the shape - is rejected: the entry points log the reason and return no triangle instead of terminating the process or letting an exception escape, and the caller may continue with the next polygon. The triangles of an accepted polygon are unchanged by the normalization.
|
static |
Triangulate a polygon without hole.
|
static |
Triangulate a polygon without hole.
|
static |
Triangulate a polygon without hole.
References osmscout::log, p2t::CDT::Triangulate(), and osmscout::Log::Warn().
|
static |
Triangulate a polygon with hole.
References p2t::CDT::AddHole(), osmscout::log, p2t::CDT::Triangulate(), and osmscout::Log::Warn().