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) { }
173 int numRemaningVertices_;
175 int 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 199 //=============================================================================
const std::vector< int > & indices() const
Get local index buffer.
int numTriangles() const
Get number of triangles.
int index(int _i) const
Get local vertex index.
Namespace providing different geometric functions concerning angles.
bool convex() const
Is the polygon convex?
bool success() const
Check if the triangulation was successful.
int numReflexVertices() const
Get number of reflex vertices.