clan::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...
 
int get_vertice_count ()
 Returns the number of vertices in the triangulator. More...
 
std::vector< Pointfget_vertices ()
 Returns a list of the vertices added to the triangulator. More...
 
void set_orientation (PolygonOrientation orientation)
 Set polygon orientation. More...
 
EarClipResult triangulate ()
 Perform triangulation. More...
 

Detailed Description

Ear-clipping triangulator.

Constructor & Destructor Documentation

clan::EarClipTriangulator::EarClipTriangulator ( )

Constructs a triangulator.

virtual clan::EarClipTriangulator::~EarClipTriangulator ( )
virtual

Member Function Documentation

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

Add the next vertex of the polygon to the triangulator.

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

Add vertex.

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

Mark beginning of a polygon hole.

PolygonOrientation clan::EarClipTriangulator::calculate_polygon_orientation ( )

Determine the orientation of the vertices in the triangulator.

void clan::EarClipTriangulator::clear ( )

Remove all vertices from triangulator.

void clan::EarClipTriangulator::end_hole ( )

Mark ending of a polygon hole.

int clan::EarClipTriangulator::get_vertice_count ( )

Returns the number of vertices in the triangulator.

std::vector<Pointf> clan::EarClipTriangulator::get_vertices ( )

Returns a list of the vertices added to the triangulator.

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

Set polygon orientation.

EarClipResult clan::EarClipTriangulator::triangulate ( )

Perform triangulation.


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