clan::EarClipTriangulator Class Reference

Ear-clipping triangulator. More...

#include <ear_clip_triangulator.h>

Public Member Functions

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

Detailed Description

Ear-clipping triangulator.

Constructor & Destructor Documentation

◆ EarClipTriangulator()

clan::EarClipTriangulator::EarClipTriangulator ( )

Constructs a triangulator.

◆ ~EarClipTriangulator()

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

Member Function Documentation

◆ add_vertex() [1/2]

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

Add vertex.

Parameters
p= Pointf

◆ add_vertex() [2/2]

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

Add the next vertex of the polygon to the triangulator.

◆ begin_hole()

void clan::EarClipTriangulator::begin_hole ( )

Mark beginning of a polygon hole.

◆ calculate_polygon_orientation()

PolygonOrientation clan::EarClipTriangulator::calculate_polygon_orientation ( )

Determine the orientation of the vertices in the triangulator.

◆ clear()

void clan::EarClipTriangulator::clear ( )

Remove all vertices from triangulator.

◆ end_hole()

void clan::EarClipTriangulator::end_hole ( )

Mark ending of a polygon hole.

◆ get_vertice_count()

int clan::EarClipTriangulator::get_vertice_count ( )

Returns the number of vertices in the triangulator.

◆ get_vertices()

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

Returns a list of the vertices added to the triangulator.

◆ set_orientation()

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

Set polygon orientation.

◆ triangulate()

EarClipResult clan::EarClipTriangulator::triangulate ( )

Perform triangulation.


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