cinder::Triangulator Class Reference

Converts an arbitrary Shape2d into a TriMesh2d. More...

#include <Triangulate.h>

List of all members.

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 ()
 Default constructor.
 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.
void 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 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.
TriMesh2d calcMesh (Winding winding=WINDING_ODD)
 Performs the tesselation, returning a TriMesh2d.

Protected Member Functions

void allocate ()

Protected Attributes

int mAllocated
std::shared_ptr< TESStesselatormTess

Detailed Description

Converts an arbitrary Shape2d into a TriMesh2d.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
WINDING_ODD 
WINDING_NONZERO 
WINDING_POSITIVE 
WINDING_NEGATIVE 
WINDING_ABS_GEQ_TWO 

Constructor & Destructor Documentation

cinder::Triangulator::Triangulator (  ) 

Default constructor.

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.


Member Function Documentation

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.

TriMesh2d cinder::Triangulator::calcMesh ( Winding  winding = WINDING_ODD  ) 

Performs the tesselation, returning a TriMesh2d.

void cinder::Triangulator::allocate (  )  [protected]

Member Data Documentation

std::shared_ptr<TESStesselator> cinder::Triangulator::mTess [protected]

The documentation for this class was generated from the following files: