GLUtessellatorCallback

GLUtessellatorCallback interface provides methods that the user will override to define the callbacks for a tessellation object.

Author

Eric Veach, July 1994

Java Port: Pepijn Van Eeckhoudt, July 2003

Java Port: Nathan Parker Burg, August 2003

Kotlin port: Edwin Jakobs, December 2021

Inheritors

Functions

Link copied to clipboard
abstract fun begin(type: Int)

The begin callback method is invoked like javax.media.opengl.GL.glBegin to indicate the start of a (triangle) primitive. The method takes a single argument of type int. If the GLU_TESS_BOUNDARY_ONLY property is set to GL_FALSE, then the argument is set to either GL_TRIANGLE_FAN, GL_TRIANGLE_STRIP, or GL_TRIANGLES. If the GLU_TESS_BOUNDARY_ONLY property is set to GL_TRUE, then the argument will be set to GL_LINE_LOOP.

Link copied to clipboard
abstract fun beginData(type: Int, polygonData: Any?)

The same as the .begin callback method except that it takes an additional reference argument. This reference is identical to the opaque reference provided when GLU.gluTessBeginPolygon was called.

Link copied to clipboard
abstract fun combine(coords: DoubleArray?, data: Array<Any?>?, weight: FloatArray?, outData: Array<Any?>?)

The combine callback method is called to create a new vertex when the tessellation detects an intersection, or wishes to merge features. The method takes four arguments: an array of three elements each of type double, an array of four references, an array of four elements each of type float, and a reference to a reference.

Link copied to clipboard
abstract fun combineData(coords: DoubleArray?, data: Array<Any?>?, weight: FloatArray?, outData: Array<Any?>?, polygonData: Any?)

The same as the .combine callback method except that it takes an additional reference argument. This reference is identical to the opaque reference provided when GLU.gluTessBeginPolygon was called.

Link copied to clipboard
abstract fun edgeFlag(boundaryEdge: Boolean)

The edgeFlag callback method is similar to javax.media.opengl.GL.glEdgeFlag. The method takes a single boolean boundaryEdge that indicates which edges lie on the polygon boundary. If the boundaryEdge is GL_TRUE, then each vertex that follows begins an edge that lies on the polygon boundary, that is, an edge that separates an interior region from an exterior one. If the boundaryEdge is GL_FALSE, then each vertex that follows begins an edge that lies in the polygon interior. The edge flag callback (if defined) is invoked before the first vertex callback.

Link copied to clipboard
abstract fun edgeFlagData(boundaryEdge: Boolean, polygonData: Any?)

The same as the .edgeFlag callback method except that it takes an additional reference argument. This reference is identical to the opaque reference provided when GLU.gluTessBeginPolygon was called.

Link copied to clipboard
abstract fun end()

The end callback serves the same purpose as javax.media.opengl.GL.glEnd. It indicates the end of a primitive and it takes no arguments.

Link copied to clipboard
abstract fun endData(polygonData: Any?)

The same as the .end callback method except that it takes an additional reference argument. This reference is identical to the opaque reference provided when GLU.gluTessBeginPolygon was called.

Link copied to clipboard
abstract fun error(errnum: Int)

The error callback method is called when an error is encountered. The one argument is of type int; it indicates the specific error that occurred and will be set to one of GLU_TESS_MISSING_BEGIN_POLYGON, GLU_TESS_MISSING_END_POLYGON, GLU_TESS_MISSING_BEGIN_CONTOUR, GLU_TESS_MISSING_END_CONTOUR, GLU_TESS_COORD_TOO_LARGE, GLU_TESS_NEED_COMBINE_CALLBACK or GLU_OUT_OF_MEMORY. Character strings describing these errors can be retrieved with the gluErrorString call.

Link copied to clipboard
abstract fun errorData(errnum: Int, polygonData: Any?)

The same as the .error callback method except that it takes an additional reference argument. This reference is identical to the opaque reference provided when GLU.gluTessBeginPolygon was called.

Link copied to clipboard
abstract fun vertex(vertexData: Any?)

The vertex callback method is invoked between the .begin and .end callback methods. It is similar to javax.media.opengl.GL.glVertex3f, and it defines the vertices of the triangles created by the tessellation process. The method takes a reference as its only argument. This reference is identical to the opaque reference provided by the user when the vertex was described (see GLU.gluTessVertex).

Link copied to clipboard
abstract fun vertexData(vertexData: Any?, polygonData: Any?)

The same as the .vertex callback method except that it takes an additional reference argument. This reference is identical to the opaque reference provided when GLU.gluTessBeginPolygon was called.