![]() |
Cinder
0.9.1
|
#include <Triangulate.h>
Classes | |
class | Exception |
Public Types | |
enum | Winding { WINDING_ODD, WINDING_NONZERO, WINDING_POSITIVE, WINDING_NEGATIVE, WINDING_ABS_GEQ_TWO } |
typedef enum cinder::Triangulator::Winding | Winding |
Public Member Functions | |
Triangulator () | |
Triangulator (const Path2d &path, float approximationScale=1.0f) | |
Triangulator (const Shape2d &shape, float approximationScale=1.0f) | |
Triangulator (const PolyLine2f &polyLine) | |
void | addShape (const Shape2d &path, float approximationScale=1.0f) |
void | addPath (const Path2d &path, float approximationScale=1.0f) |
void | addPolyLine (const PolyLine2f &polyLine) |
void | addPolyLine (const vec2 *points, size_t numPoints) |
TriMesh | calcMesh (Winding winding=WINDING_ODD) |
TriMeshRef | createMesh (Winding winding=WINDING_ODD) |
Protected Member Functions | |
void | allocate () |
Protected Attributes | |
int | mAllocated |
std::shared_ptr< TESStesselator > | mTess |
Converts an arbitrary Shape2d into a TriMesh2d.
cinder::Triangulator::Triangulator | ( | ) |
Default constructor.
cinder::Triangulator::Triangulator | ( | const Path2d & | path, |
float | approximationScale = 1.0f |
||
) |
Constructs using a Path2d. approximationScale represents how smooth the tesselation is, with 1.0 corresponding to 1:1 with screen space.
cinder::Triangulator::Triangulator | ( | const Shape2d & | shape, |
float | approximationScale = 1.0f |
||
) |
Constructs using a Shape2d. approximationScale represents how smooth the tesselation is, with 1.0 corresponding to 1:1 with screen space.
cinder::Triangulator::Triangulator | ( | const PolyLine2f & | polyLine | ) |
Constructs using a PolyLine2f.
void cinder::Triangulator::addShape | ( | const Shape2d & | path, |
float | approximationScale = 1.0f |
||
) |
Adds a Shape2d to the tesselation. approximationScale represents how smooth the tesselation is, with 1.0 corresponding to 1:1 with screen space.
void cinder::Triangulator::addPath | ( | const Path2d & | path, |
float | approximationScale = 1.0f |
||
) |
Adds a Path2d to the tesselation. approximationScale represents how smooth the tesselation is, with 1.0 corresponding to 1:1 with screen space.
void cinder::Triangulator::addPolyLine | ( | const PolyLine2f & | polyLine | ) |
Adds a PolyLine2f to the tesselation.
void cinder::Triangulator::addPolyLine | ( | const vec2 * | points, |
size_t | numPoints | ||
) |
Adds a PolyLine defined as a series of vec2's.
TriMesh cinder::Triangulator::calcMesh | ( | Winding | winding = WINDING_ODD | ) |
Performs the tesselation, returning a TriMesh2d.
TriMeshRef cinder::Triangulator::createMesh | ( | Winding | winding = WINDING_ODD | ) |
Performs the tesselation, returning a TriMesh2d.
|
protected |
|
protected |
|
protected |