6 #ifndef CNOID_UTIL_TRIANGULATOR_H_INCLUDED
7 #define CNOID_UTIL_TRIANGULATOR_H_INCLUDED
10 #include <boost/dynamic_bitset.hpp>
19 this->vertices = &vertices;
25 int apply(
const std::vector<int>& polygon);
38 enum Convexity { FLAT, CONVEX, CONCAVE };
41 const std::vector<int>* orgPolygon;
42 std::vector<int> triangles_;
43 std::vector<int> workPolygon;
45 boost::dynamic_bitset<> earMask;
47 inline const SFVec3f& vertex(
int localIndex){
48 return (*vertices)[(*orgPolygon)[localIndex]];
51 inline const SFVec3f& workVertex(
int workPolygonIndex){
52 return (*vertices)[(*orgPolygon)[workPolygon[workPolygonIndex]]];
55 Convexity calcConvexity(
int ear);
56 bool checkIfEarContainsOtherVertices(
int ear);
Definition: Triangulator.h:14
void setVertices(const MFVec3f &vertices)
Definition: Triangulator.h:18
Eigen::Vector3d SFVec3f
Definition: VrmlNodes.h:35
int apply(const std::vector< int > &polygon)
Definition: Triangulator.cpp:10
std::vector< SFVec3f > MFVec3f
Definition: VrmlNodes.h:49
const std::vector< int > & triangles()
Definition: Triangulator.h:32