OGS
|
Definition at line 27 of file EarClippingTriangulation.h.
#include <EarClippingTriangulation.h>
Public Member Functions | |
EarClippingTriangulation (GeoLib::Polygon const &polygon, std::list< GeoLib::Triangle > &triangles, bool rot=true) | |
~EarClippingTriangulation () | |
Private Member Functions | |
void | copyPolygonPoints (GeoLib::Polygon const &polygon) |
void | ensureCWOrientation () |
bool | isEar (std::size_t v0, std::size_t v1, std::size_t v2) const |
void | initVertexList () |
void | initLists () |
void | clipEars () |
void | addLastTriangle () |
Private Attributes | |
std::vector< GeoLib::Point * > | _pnts |
std::list< std::size_t > | _vertex_list |
std::list< std::size_t > | _convex_vertex_list |
std::list< std::size_t > | _ear_list |
std::list< GeoLib::Triangle > | _triangles |
GeoLib::Orientation | _original_orientation |
GeoLib::EarClippingTriangulation::EarClippingTriangulation | ( | GeoLib::Polygon const & | polygon, |
std::list< GeoLib::Triangle > & | triangles, | ||
bool | rot = true ) |
Definition at line 27 of file EarClippingTriangulation.cpp.
References _original_orientation, _pnts, _triangles, addLastTriangle(), clipEars(), copyPolygonPoints(), GeoLib::CW, ensureCWOrientation(), GeoLib::Polyline::getPointID(), GeoLib::Polyline::getPointsVec(), initLists(), initVertexList(), and GeoLib::rotatePointsToXY().
GeoLib::EarClippingTriangulation::~EarClippingTriangulation | ( | ) |
|
private |
Definition at line 337 of file EarClippingTriangulation.cpp.
References _pnts, _triangles, _vertex_list, GeoLib::CCW, and GeoLib::getOrientation().
Referenced by EarClippingTriangulation().
|
inlineprivate |
Definition at line 208 of file EarClippingTriangulation.cpp.
References _convex_vertex_list, _ear_list, _pnts, _triangles, _vertex_list, GeoLib::COLLINEAR, GeoLib::CW, GeoLib::getOrientation(), isEar(), and BaseLib::uniquePushBack().
Referenced by EarClippingTriangulation().
|
inlineprivate |
copies the points of the polygon to the vector _pnts
Definition at line 76 of file EarClippingTriangulation.cpp.
References _pnts, GeoLib::Polyline::getNumberOfPoints(), and GeoLib::Polyline::getPoint().
Referenced by EarClippingTriangulation().
|
inlineprivate |
Definition at line 86 of file EarClippingTriangulation.cpp.
References _original_orientation, _pnts, GeoLib::CCW, and GeoLib::getOrientation().
Referenced by EarClippingTriangulation().
|
inlineprivate |
Definition at line 162 of file EarClippingTriangulation.cpp.
References _convex_vertex_list, _ear_list, _pnts, _vertex_list, GeoLib::COLLINEAR, GeoLib::CW, GeoLib::getOrientation(), isEar(), and WARN().
Referenced by EarClippingTriangulation().
|
inlineprivate |
Definition at line 156 of file EarClippingTriangulation.cpp.
References _pnts, and _vertex_list.
Referenced by EarClippingTriangulation().
|
inlineprivate |
Definition at line 139 of file EarClippingTriangulation.cpp.
References _pnts, _vertex_list, and MathLib::isPointInTriangle().
Referenced by clipEars(), and initLists().
|
private |
Definition at line 54 of file EarClippingTriangulation.h.
Referenced by clipEars(), and initLists().
|
private |
Definition at line 55 of file EarClippingTriangulation.h.
Referenced by clipEars(), and initLists().
|
private |
Definition at line 62 of file EarClippingTriangulation.h.
Referenced by EarClippingTriangulation(), and ensureCWOrientation().
|
private |
a copy of the polygon points
Definition at line 52 of file EarClippingTriangulation.h.
Referenced by EarClippingTriangulation(), ~EarClippingTriangulation(), addLastTriangle(), clipEars(), copyPolygonPoints(), ensureCWOrientation(), initLists(), initVertexList(), and isEar().
|
private |
triangles of the triangulation (maybe in the wrong orientation)
Definition at line 60 of file EarClippingTriangulation.h.
Referenced by EarClippingTriangulation(), addLastTriangle(), and clipEars().
|
private |
Definition at line 53 of file EarClippingTriangulation.h.
Referenced by addLastTriangle(), clipEars(), initLists(), initVertexList(), and isEar().