42 #ifndef ACG_TRIANGULATOR_HH 43 #define ACG_TRIANGULATOR_HH 47 #include <ACG/Math/VectorT.hh> 48 #include <ACG/Config/ACGDefines.hh> 81 int index(
int _i)
const {
return tris_[_i]; }
87 const std::vector<int>&
indices()
const {
return tris_; }
93 bool convex()
const {
return convex_; }
108 bool isReflexVertex(
int _i)
const;
119 void initVertexList();
132 float triangleAreaSign(
const Vec2f& v0,
const Vec2f& v1,
const Vec2f& v2)
const;
133 float distancePointToSegmentSq(
const Vec2f& v0,
const Vec2f& v1,
const Vec2f& pt)
const;
136 bool isReflexVertex(
const Vec2f& v0,
const Vec2f& v1,
const Vec2f& v2)
const;
148 : id(i), reflex(r), pos(x), prev(p), next(n) { }
163 const size_t polySize_;
164 size_t numRemaningVertices_;
166 size_t numReflexVertices_;
172 std::vector<Vec2f> pos_;
174 std::vector<RingVertex> vertices_;
175 std::list<RingVertex*> reflexVertices_;
177 std::vector<int> tris_;
189 #endif // ACG_TRIANGULATOR_HH defined size_t numReflexVertices() const
Get number of reflex vertices.
Namespace providing different geometric functions concerning angles.
bool success() const
Check if the triangulation was successful.
int index(int _i) const
Get local vertex index.
bool convex() const
Is the polygon convex?
const std::vector< int > & indices() const
Get local index buffer.
size_t numTriangles() const
Get number of triangles.