public static class GLUTessellatorSupport.RecursiveCallback
extends com.jogamp.opengl.glu.GLUtessellatorCallbackAdapter
RecursiveCallback must be used as the GLUtessellatorCallback for the begin, end, vertex, and combine callbacks for a GLU tessellator configured to generate line loops. A GLU tessellator can be configured generate line loops by calling gluTessProperty(GLU_TESS_BOUNDARY_ONLY, GL_TRUE). Additionally, the caller specified vertex data passed to gluTessVertex must be a double array containing three elements - the x, y and z coordinates associated with the vertex.
| Modifier and Type | Field and Description |
|---|---|
protected com.jogamp.opengl.glu.GLUtessellator |
tess
The GLU tessellator that receives the tessellation results sent to this callback.
|
| Constructor and Description |
|---|
RecursiveCallback(com.jogamp.opengl.glu.GLUtessellator tessellator)
Creates a new RecursiveCallback with the GLU tessellator that receives boundary tessellation results.
|
| Modifier and Type | Method and Description |
|---|---|
void |
begin(int type)
Called by the GLU tessellator to indicate the beginning of a new line loop.
|
void |
combine(double[] coords,
java.lang.Object[] vertexData,
float[] weight,
java.lang.Object[] outData)
Called by the GLU tessellator to indicate that up to four vertices must be merged into a new vertex.
|
void |
end()
Called by the GLU tessellator to indicate the end of the current line loop.
|
void |
error(int errno)
Called by the GLU tessellator when the tessellation algorithm encounters an error.
|
void |
vertex(java.lang.Object vertexData)
Called by the GLU tessellator to indicate the next vertex of the current contour.
|
protected com.jogamp.opengl.glu.GLUtessellator tess
public RecursiveCallback(com.jogamp.opengl.glu.GLUtessellator tessellator)
tessellator - the GLU tessellator that receives the tessellation results sent to this callback. This
tessellator may be configured in any way the caller chooses, but should be prepared to
receive contour input from this callback.java.lang.IllegalArgumentException - if the tessellator is null.public void begin(int type)
begin in interface com.jogamp.opengl.glu.GLUtessellatorCallbackbegin in class com.jogamp.opengl.glu.GLUtessellatorCallbackAdaptertype - the GL primitive type. Must be GL_LINE_LOOP.public void combine(double[] coords,
java.lang.Object[] vertexData,
float[] weight,
java.lang.Object[] outData)
combine in interface com.jogamp.opengl.glu.GLUtessellatorCallbackcombine in class com.jogamp.opengl.glu.GLUtessellatorCallbackAdaptercoords - A three element array containing the x, y and z coordinates of the new vertex.vertexData - The caller specified vertex data of the original vertices.weight - The coefficients of the linear combination. These weights sum to 1.outData - A one element array that must contain the caller specified data associated with the new
vertex after this method returns.public void end()
end in interface com.jogamp.opengl.glu.GLUtessellatorCallbackend in class com.jogamp.opengl.glu.GLUtessellatorCallbackAdapterpublic void error(int errno)
error in interface com.jogamp.opengl.glu.GLUtessellatorCallbackerror in class com.jogamp.opengl.glu.GLUtessellatorCallbackAdaptererrno - a GLU enumeration indicating the error.public void vertex(java.lang.Object vertexData)
vertex in interface com.jogamp.opengl.glu.GLUtessellatorCallbackvertex in class com.jogamp.opengl.glu.GLUtessellatorCallbackAdaptervertexData - the caller specified vertex data. Must be a double array containing three elements - the x,
y and z coordinates associated with the vertex.