|
const size_t | polySize_ |
|
size_t | numRemaningVertices_ |
|
size_t | numTris_ |
|
size_t | numReflexVertices_ |
|
bool | ok_ |
|
bool | convex_ |
|
std::vector< Vec2f > | pos_ |
|
std::vector< RingVertex > | vertices_ |
|
std::list< RingVertex * > | reflexVertices_ |
|
std::vector< int > | tris_ |
|
Definition at line 58 of file Triangulator.hh.
◆ Triangulator()
ACG::Triangulator::Triangulator |
( |
const std::vector< Vec3f > & |
_pos | ) |
|
|
explicit |
Execute the triangulation algorithm on a polygon.
- Parameters
-
_pos | polygon vertex positions (ccw) |
Definition at line 52 of file Triangulator.cc.
◆ convex()
bool ACG::Triangulator::convex |
( |
| ) |
const |
|
inline |
Is the polygon convex?
- Returns
- convex true or false
Definition at line 93 of file Triangulator.hh.
◆ index()
int ACG::Triangulator::index |
( |
int |
_i | ) |
const |
|
inline |
Get local vertex index.
- Parameters
-
_i | index to index buffer in range [0, .., numTris*3 - 1] |
- Returns
- vertex index in range [0, .., _pos.size()-1], where _pos is the input vector of positions as passed to the constructor
Definition at line 81 of file Triangulator.hh.
◆ indices()
const std::vector<int>& ACG::Triangulator::indices |
( |
| ) |
const |
|
inline |
Get local index buffer.
- Returns
- index buffer
Definition at line 87 of file Triangulator.hh.
◆ isReflexVertex()
bool ACG::Triangulator::isReflexVertex |
( |
int |
_i | ) |
const |
Check if a vertex is reflex.
A reflex vertex is a vertex with an inner angle larger than 180 deg.
- Parameters
-
_i | local vertex index in range [0, .., _pos.size()-1] |
- Returns
- reflex vertex true or false
Definition at line 188 of file Triangulator.cc.
◆ numReflexVertices()
size_t ACG::Triangulator::numReflexVertices |
( |
| ) |
const |
|
inline |
Get number of reflex vertices.
A reflex vertex is a vertex with an inner angle larger than 180 deg.
- Returns
- number of reflex vertices
Definition at line 100 of file Triangulator.hh.
◆ numTriangles()
size_t ACG::Triangulator::numTriangles |
( |
| ) |
const |
|
inline |
Get number of triangles.
- Returns
- number of triangles after triangulation
Definition at line 74 of file Triangulator.hh.
◆ success()
bool ACG::Triangulator::success |
( |
| ) |
const |
|
inline |
Check if the triangulation was successful.
- Returns
- success true or false
Definition at line 114 of file Triangulator.hh.
The documentation for this class was generated from the following files: