Tessellator
A class responsible for handling tessellation functionality. Tessellation is the process of dividing a polygonal shape into smaller components such as triangles or other primitives for rendering purposes.
Tessellator extends GLUtessellatorImpl
and provides a concrete implementation of tessellation callbacks for processing vertices, handling errors, and combining coordinates during the tessellation process.
The primary output of the tessellation process is a list of primitives that contain the tessellated shapes and their respective vertex positions.
The internal callbacks handle the following:
Beginning the creation of a new primitive by detecting the type of primitive to be generated.
Storing vertex positions associated with the current tessellation primitive.
Handling errors that may arise during tessellation.
Combining vertices when new intersection points are generated during tessellation.
Properties
Functions
Deletes a previously created GLU tessellation object. This method should be called to free resources associated with the tessellator when it is no longer needed. After calling this, the tessellation object becomes invalid and should not be used.
Retrieves the current value of a specified tessellation property. This method is used to query a property of the GLU tessellator.
Marks the beginning of a new contour within the current polygon being defined for tessellation in the GLU tessellator.
Begins a new polygon definition for tessellation using the GLU tessellator. This method starts the specification of a polygon, which will be defined using vertices and may consist of multiple contours. The data
parameter allows attaching custom application-specific data to the polygon, which can be retrieved during callback events.
Defines a callback function for the GLU tessellation object. The callback is associated with a specific tessellation event identified by the which
parameter. This method allows users to specify behavior for various tessellation-related events such as errors, vertex processing, edge flags, and others.
Marks the end of the current contour being defined for tessellation in the GLU tessellator.
Completes the definition of the current polygon in the tessellation process.
Specifies the normal vector for the tessellation. This method is used to define a normal vector that provides a hint to the tessellator for the orientation of the following vertices. The normal vector can help determine which direction is "up" for planar tessellation.
Sets a tessellation property for the GLU tessellator using an integer value. This method internally converts the integer value to a double and delegates to the corresponding method that accepts a double value.
Sets a tessellation property for the GLU tessellator. This method allows configuring various properties of the tessellator, such as winding rules, boundary-only settings, and tessellation tolerance.
Defines a vertex for tessellation processing in the GLU tessellator. This method specifies a vertex using its coordinates and associates custom data with the vertex. The vertex will be processed as part of the tessellation operation.