Module org.praxislive.libp5x.core
Package processing.opengl
Class PGraphicsOpenGL.Tessellator.TessellatorCallback
- java.lang.Object
-
- processing.opengl.PGraphicsOpenGL.Tessellator.TessellatorCallback
-
- All Implemented Interfaces:
PGL.TessellatorCallback
- Enclosing class:
- PGraphicsOpenGL.Tessellator
protected class PGraphicsOpenGL.Tessellator.TessellatorCallback extends Object implements PGL.TessellatorCallback
-
-
Constructor Summary
Constructors Constructor Description TessellatorCallback(PGraphicsOpenGL.AttributeMap attribs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddIndex(int tessIdx)voidbegin(int type)protected voidcalcTriNormal(int tessIdx0, int tessIdx1, int tessIdx2)voidcombine(double[] coords, Object[] data, float[] weight, Object[] outData)Implementation of the GLU_TESS_COMBINE callback.voidend()voiderror(int errnum)voidinit(boolean addCache, boolean strokeTess, boolean calcNorm, boolean clampXY)voidvertex(Object data)
-
-
-
Constructor Detail
-
TessellatorCallback
public TessellatorCallback(PGraphicsOpenGL.AttributeMap attribs)
-
-
Method Detail
-
init
public void init(boolean addCache, boolean strokeTess, boolean calcNorm, boolean clampXY)
-
begin
public void begin(int type)
- Specified by:
beginin interfacePGL.TessellatorCallback
-
end
public void end()
- Specified by:
endin interfacePGL.TessellatorCallback
-
addIndex
protected void addIndex(int tessIdx)
-
calcTriNormal
protected void calcTriNormal(int tessIdx0, int tessIdx1, int tessIdx2)
-
vertex
public void vertex(Object data)
- Specified by:
vertexin interfacePGL.TessellatorCallback
-
error
public void error(int errnum)
- Specified by:
errorin interfacePGL.TessellatorCallback
-
combine
public void combine(double[] coords, Object[] data, float[] weight, Object[] outData)Implementation of the GLU_TESS_COMBINE callback.- Specified by:
combinein interfacePGL.TessellatorCallback- Parameters:
coords- is the 3-vector of the new vertexdata- is the vertex data to be combined, up to four elements. This is useful when mixing colors together or any other user data that was passed in to gluTessVertex.weight- is an array of weights, one for each element of "data" that should be linearly combined for new values.outData- is the set of new values of "data" after being put back together based on the weights. it's passed back as a single element Object[] array because that's the closest that Java gets to a pointer.
-
-