uicore::EarClipTriangulator Class Reference

Ear-clipping triangulator. More...

#include <ear_clip_triangulator.h>

Public Member Functions

 EarClipTriangulator ()
 Constructs a triangulator. More...
 
virtual ~EarClipTriangulator ()
 
void add_vertex (float x, float y)
 Add the next vertex of the polygon to the triangulator. More...
 
void add_vertex (const Pointf &p)
 Add vertex. More...
 
void begin_hole ()
 Mark beginning of a polygon hole. More...
 
PolygonOrientation calculate_polygon_orientation ()
 Determine the orientation of the vertices in the triangulator. More...
 
void clear ()
 Remove all vertices from triangulator. More...
 
void end_hole ()
 Mark ending of a polygon hole. More...
 
void set_orientation (PolygonOrientation orientation)
 Set polygon orientation. More...
 
std::vector< EarClipTriangletriangulate ()
 Perform triangulation. More...
 
int vertice_count ()
 Returns the number of vertices in the triangulator. More...
 
std::vector< Pointfvertices ()
 Returns a list of the vertices added to the triangulator. More...
 

Detailed Description

Ear-clipping triangulator.

Constructor & Destructor Documentation

uicore::EarClipTriangulator::EarClipTriangulator ( )

Constructs a triangulator.

virtual uicore::EarClipTriangulator::~EarClipTriangulator ( )
virtual

Member Function Documentation

void uicore::EarClipTriangulator::add_vertex ( float  x,
float  y 
)

Add the next vertex of the polygon to the triangulator.

void uicore::EarClipTriangulator::add_vertex ( const Pointf p)

Add vertex.

Parameters
p= Pointf
void uicore::EarClipTriangulator::begin_hole ( )

Mark beginning of a polygon hole.

PolygonOrientation uicore::EarClipTriangulator::calculate_polygon_orientation ( )

Determine the orientation of the vertices in the triangulator.

void uicore::EarClipTriangulator::clear ( )

Remove all vertices from triangulator.

void uicore::EarClipTriangulator::end_hole ( )

Mark ending of a polygon hole.

void uicore::EarClipTriangulator::set_orientation ( PolygonOrientation  orientation)

Set polygon orientation.

std::vector<EarClipTriangle> uicore::EarClipTriangulator::triangulate ( )

Perform triangulation.

int uicore::EarClipTriangulator::vertice_count ( )

Returns the number of vertices in the triangulator.

std::vector<Pointf> uicore::EarClipTriangulator::vertices ( )

Returns a list of the vertices added to the triangulator.


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