A tesselator to triangulate arbitrary 2D surfaces defined by a set of contours. More...
#include <Tesselator.h>
Inherits Object.
Public Member Functions | |
Tesselator () | |
Creates a new tesselator. | |
virtual | ~Tesselator () |
Destroys this tesselator. | |
void | beginPolygon (ptr< Mesh< vec2f, unsigned int > > mesh) |
Starts a new triangulation. | |
void | beginContour () |
Starts a new contour. | |
void | newVertex (float x, float y) |
Defines a new vertex in the current contour. | |
void | endContour () |
Ends the current contour. | |
void | endPolygon () |
Ends the current triangulation. |
A tesselator to triangulate arbitrary 2D surfaces defined by a set of contours.
Nested contours define holes.
proland::Tesselator::Tesselator | ( | ) |
Creates a new tesselator.
virtual proland::Tesselator::~Tesselator | ( | ) | [virtual] |
Destroys this tesselator.
void proland::Tesselator::beginContour | ( | ) |
Starts a new contour.
void proland::Tesselator::beginPolygon | ( | ptr< Mesh< vec2f, unsigned int > > | mesh | ) |
Starts a new triangulation.
mesh | the mesh where the triangles generated by triangulation are added. This mesh must be in AttributeBuffer::TRIANGLES mode (see Mesh::setMode). |
void proland::Tesselator::endContour | ( | ) |
Ends the current contour.
void proland::Tesselator::endPolygon | ( | ) |
Ends the current triangulation.
void proland::Tesselator::newVertex | ( | float | x, | |
float | y | |||
) |
Defines a new vertex in the current contour.