#include <tesselator.h>
Public Member Functions | |
| Tesselator (Vectorizer &vectorizer, int windingRule) | |
| Create a new tesselator and tesselate. | |
| ~Tesselator () | |
| Destroy this tesselator. | |
| void | draw (float nx=0.0f, float ny=0.0f, float nz=1.0f, float z=0.0f) const |
| Draw the tesselated result. | |
A wrapper for GLU tesselators that saves the triangulated result of the tesselation.
| glttf::Tesselator::Tesselator | ( | Vectorizer & | vectorizer, | |
| int | windingRule | |||
| ) |
Create a new tesselator and tesselate.
Create a new GLU tesselator, tesselate the vectorizer's contours, deallocate all used memory, and destroy the GLU tesselator.
| vectorizer | the vectorizer which has the countours to be tesselated | |
| windingRule | the winding rule of the glyph (glyph->outline.flags) |
| std::runtime_error | if there's not enough memory for the tesselation, a GLU tesselator can't be created or there is a tesselation error. |
| void glttf::Tesselator::draw | ( | float | nx = 0.0f, |
|
| float | ny = 0.0f, |
|||
| float | nz = 1.0f, |
|||
| float | z = 0.0f | |||
| ) | const |
Draw the tesselated result.
| nx | the x component of the normal vector of the tesselated polygon | |
| ny | the y component of the normal vector of the tesselated polygon | |
| nz | the z component of the normal vector of the tesselated polygon | |
| z | the depth (z coordinate) where to draw the tesselated polygon |
1.5.1