28 INLINE
int Triangulator::
29 get_num_vertices()
const {
30 return _vertices.size();
38 nassertr(n >= 0 && n < (
int)_vertices.size(), LPoint2d::zero());
48 return check_left_winding(_polygon);
54 INLINE Triangulator::Triangle::
56 _v0(t->vert[v0].user_i),
57 _v1(t->vert[v1].user_i),
58 _v2(t->vert[v2].user_i)
65 INLINE Triangulator::segment_t::
72 INLINE Triangulator::segment_t::
73 segment_t(
Triangulator *t,
int v0_i,
int v1_i,
int prev,
int next) :
80 v0.x = t->_vertices[v0_i][0];
81 v0.y = t->_vertices[v0_i][1];
83 v1.x = t->_vertices[v1_i][0];
84 v1.y = t->_vertices[v1_i][1];
This class can triangulate a convex or concave polygon, even one with holes.
get_vertex
Returns the nth vertex.
bool is_left_winding() const
Returns true if the polygon vertices are listed in counterclockwise order, or false if they appear to...
int add_vertex(const LPoint2d &point)
Adds a new vertex to the vertex pool.