#include <Triangulator.h>
Public Member Functions | |
int | apply (const std::vector< int > &polygon) |
void | setVertices (const MFVec3f &vertices) |
const std::vector< int > & | triangles () |
Private Types | |
enum | Convexity { FLAT, CONVEX, CONCAVE } |
Private Member Functions | |
Convexity | calcConvexity (int ear) |
bool | checkIfEarContainsOtherVertices (int ear) |
Vector3Ref | vertex (int localIndex) |
Vector3Ref | workVertex (int workPolygonIndex) |
Private Attributes | |
Vector3 | ccs |
boost::dynamic_bitset | earMask |
const std::vector< int > * | orgPolygon |
std::vector< int > | triangles_ |
const MFVec3f * | vertices |
std::vector< int > | workPolygon |
Definition at line 24 of file Triangulator.h.
enum hrp::Triangulator::Convexity [private] |
Definition at line 48 of file Triangulator.h.
int Triangulator::apply | ( | const std::vector< int > & | polygon | ) |
Definition at line 20 of file Triangulator.cpp.
Triangulator::Convexity Triangulator::calcConvexity | ( | int | ear | ) | [private] |
Definition at line 89 of file Triangulator.cpp.
bool Triangulator::checkIfEarContainsOtherVertices | ( | int | ear | ) | [private] |
Definition at line 110 of file Triangulator.cpp.
void hrp::Triangulator::setVertices | ( | const MFVec3f & | vertices | ) | [inline] |
Definition at line 28 of file Triangulator.h.
const std::vector<int>& hrp::Triangulator::triangles | ( | ) | [inline] |
Triangulated indices. This value is available after calling the 'apply' method. The indices are local ones in the polygon index vector given to the apply method.
Definition at line 42 of file Triangulator.h.
Vector3Ref hrp::Triangulator::vertex | ( | int | localIndex | ) | [inline, private] |
Definition at line 57 of file Triangulator.h.
Vector3Ref hrp::Triangulator::workVertex | ( | int | workPolygonIndex | ) | [inline, private] |
Definition at line 61 of file Triangulator.h.
Vector3 hrp::Triangulator::ccs [private] |
Definition at line 54 of file Triangulator.h.
boost::dynamic_bitset hrp::Triangulator::earMask [private] |
Definition at line 55 of file Triangulator.h.
const std::vector<int>* hrp::Triangulator::orgPolygon [private] |
Definition at line 51 of file Triangulator.h.
std::vector<int> hrp::Triangulator::triangles_ [private] |
Definition at line 52 of file Triangulator.h.
const MFVec3f* hrp::Triangulator::vertices [private] |
Definition at line 50 of file Triangulator.h.
std::vector<int> hrp::Triangulator::workPolygon [private] |
Definition at line 53 of file Triangulator.h.