Public Methods | |
TessPoly () | |
int | setWindingRule (GLenum winding_rule) |
int | renderContour (double obj_data[][6], GLuint num_vertices) |
int | beginPolygon (void) |
int | endPolygon (void) |
int | beginContour (void) |
int | endContour (void) |
int | end (void) |
Private Attributes | |
GLUtesselator * | tobj |
the tessellation object |
|
Sets up everything for basic tessellation. It creates the tessellation objects and specifies the callback functions. GLU_TESS_BEGIN and GLU_TESS_END are pointed to the OpenGL functions glBegin( ) and glEnd( ), respectively. GLU_TESS_COMBINE is associated with a user-defined function, combineCallback( ), which will be defined later. GLU_TESS_VERTEX is also associated with a user-defined function, vertexCallback, which will also be defined and explained later. |
|
TessPoly::Begin_Contour( ) initializes a new contour of the current polygon. |
|
TessPoly::Begin_Polygon( ) initializes a new polygon. |
|
TessPoly::End( ) deletes the tessellation object. |
|
TessPoly::End_Contour( ) ends the current contour. |
|
TessPoly::End_Polygon( ) ends a polygon. |
|
TessPoly::Render_Contour( ) renders a full contour of a polygon. obj_data refers to the array that contains all the vertex data for the contour. For what we need, the vertex data will include the vertex coordinate and color value. num_vertices is the number of vertices for the contour. |
|
TessPoly::Set_Winding_Rule( ) simply sets the winding rule to the value of winding_rule for the current polygon. |
|
the tessellation object
|