51 #ifndef ACG_TRIANGULATOR_HH
52 #define ACG_TRIANGULATOR_HH
56 #include <ACG/Math/VectorT.hh>
57 #include <ACG/Config/ACGDefines.hh>
90 int index(
int _i)
const {
return tris_[_i]; }
96 const std::vector<int>&
indices()
const {
return tris_; }
117 bool isReflexVertex(
int _i)
const;
128 void initVertexList();
141 float triangleAreaSign(
const Vec2f& v0,
const Vec2f& v1,
const Vec2f& v2)
const;
142 float distancePointToSegmentSq(
const Vec2f& v0,
const Vec2f& v1,
const Vec2f& pt)
const;
145 bool isReflexVertex(
const Vec2f& v0,
const Vec2f& v1,
const Vec2f& v2)
const;
157 : id(i), reflex(r), pos(x), prev(p), next(n) { }
172 const size_t polySize_;
173 size_t numRemaningVertices_;
175 size_t numReflexVertices_;
181 std::vector<Vec2f> pos_;
183 std::vector<RingVertex> vertices_;
184 std::list<RingVertex*> reflexVertices_;
186 std::vector<int> tris_;
198 #endif // ACG_TRIANGULATOR_HH defined
bool success() const
Check if the triangulation was successful.
Namespace providing different geometric functions concerning angles.
const std::vector< int > & indices() const
Get local index buffer.
size_t numReflexVertices() const
Get number of reflex vertices.
int index(int _i) const
Get local vertex index.
bool convex() const
Is the polygon convex?
size_t numTriangles() const
Get number of triangles.