org.mt4j.util.opengl
Class GLuTesselator

java.lang.Object
  extended by javax.media.opengl.glu.GLUtessellatorCallbackAdapter
      extended by org.mt4j.util.opengl.GLuTesselator
All Implemented Interfaces:
javax.media.opengl.glu.GLUtessellatorCallback

Deprecated.


public class GLuTesselator
extends javax.media.opengl.glu.GLUtessellatorCallbackAdapter

    

A wrapper class for use of the GLU-Tesselator. The tesselator can break down a shape made of of vertices into triangles. By providing information about the objects to tesselate, we can create polygons with holes, for example. Can be used to record a displaylist or to tesselate and draw in immediate mode. Opengl drawing commands are invoked during tesselation. Only works when using opengl renderer.

Author:
C.Ruff

Constructor Summary
GLuTesselator(javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu)
          Deprecated. Creates a new tesselator object and defines callback methods, which the tesselator will later call.
 
Method Summary
 void begin(int type)
          Deprecated.  
 void combine(double[] coords, java.lang.Object[] data, float[] weight, java.lang.Object[] outData)
          Deprecated. CombineCallback is used to create a new vertex when edges intersect.
 void deleteTess()
          Deprecated. Delete tess.
 void end()
          Deprecated.  
 void error(int errnum)
          Deprecated.  
 javax.media.opengl.glu.GLUtessellator getTesselator()
          Deprecated. Gets the tesselator.
 void tesselate(java.util.List<Vertex[]> contours)
          Deprecated. Tesselate.
 void tesselate(java.util.List<Vertex[]> contours, int windingRule)
          Deprecated. Tesselate.
 void tesselate(Vertex[] contour, int windingRule)
          Deprecated. Tesselate.
 int tesselateToDisplayList(java.util.List<Vertex[]> contours, processing.core.PApplet pa)
          Deprecated. Tesselates the contours, draws it while recording a displaylist and returns the id of the displaylist for later use.
 int tesselateToDisplayList(java.util.List<Vertex[]> contours, processing.core.PApplet pa, int windingRule)
          Deprecated. Tesselates the contours, draws it while recording a displaylist and returns the id of the displaylist for later use.
 void vertex(java.lang.Object vertexData)
          Deprecated. Callback function.
 void vertexData(java.lang.Object vertexData, java.lang.Object polygonData)
          Deprecated.  
 
Methods inherited from class javax.media.opengl.glu.GLUtessellatorCallbackAdapter
beginData, combineData, edgeFlag, edgeFlagData, endData, errorData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GLuTesselator

public GLuTesselator(javax.media.opengl.GL gl,
                     javax.media.opengl.glu.GLU glu)
Deprecated. 
Creates a new tesselator object and defines callback methods, which the tesselator will later call. These are defined in this class.

Parameters:
gl - the gl
glu - the glu
Method Detail

deleteTess

public void deleteTess()
Deprecated. 
Delete tess.


tesselateToDisplayList

public int tesselateToDisplayList(java.util.List<Vertex[]> contours,
                                  processing.core.PApplet pa)
Deprecated. 
Tesselates the contours, draws it while recording a displaylist and returns the id of the displaylist for later use.

Parameters:
contours - the contours
pa - the pa
Returns:
the int

tesselateToDisplayList

public int tesselateToDisplayList(java.util.List<Vertex[]> contours,
                                  processing.core.PApplet pa,
                                  int windingRule)
Deprecated. 
Tesselates the contours, draws it while recording a displaylist and returns the id of the displaylist for later use. The winding rule determines how the contours are tesselated and which part of the objects is "inside" and what is "outside".

Parameters:
contours - the contours
pa - the pa
windingRule - the winding rule
Returns:
the int

tesselate

public void tesselate(Vertex[] contour,
                      int windingRule)
Deprecated. 
Tesselate.

Parameters:
contour - the contour
windingRule - the winding rule

tesselate

public void tesselate(java.util.List<Vertex[]> contours)
Deprecated. 
Tesselate.

Parameters:
contours - the contours

tesselate

public void tesselate(java.util.List<Vertex[]> contours,
                      int windingRule)
Deprecated. 
Tesselate.

Parameters:
contours - the contours
windingRule - the winding rule

begin

public void begin(int type)
Deprecated. 
Specified by:
begin in interface javax.media.opengl.glu.GLUtessellatorCallback
Overrides:
begin in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter

vertex

public void vertex(java.lang.Object vertexData)
Deprecated. 
Callback function. Gets called by the tesselator when a new vertex should be drawn.

Specified by:
vertex in interface javax.media.opengl.glu.GLUtessellatorCallback
Overrides:
vertex in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter
Parameters:
vertexData - the vertex data

vertexData

public void vertexData(java.lang.Object vertexData,
                       java.lang.Object polygonData)
Deprecated. 
Specified by:
vertexData in interface javax.media.opengl.glu.GLUtessellatorCallback
Overrides:
vertexData in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter

combine

public void combine(double[] coords,
                    java.lang.Object[] data,
                    float[] weight,
                    java.lang.Object[] outData)
Deprecated. 
CombineCallback is used to create a new vertex when edges intersect. coordinate location is trivial to calculate, but weight[4] may be used to average color, normal, or texture coordinate data.

This is called before the call to the vertex-callback method,

Specified by:
combine in interface javax.media.opengl.glu.GLUtessellatorCallback
Overrides:
combine in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter
Parameters:
coords - the coords
data - the data
weight - the weight
outData - the out data

end

public void end()
Deprecated. 
Specified by:
end in interface javax.media.opengl.glu.GLUtessellatorCallback
Overrides:
end in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter

error

public void error(int errnum)
Deprecated. 
Specified by:
error in interface javax.media.opengl.glu.GLUtessellatorCallback
Overrides:
error in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter

getTesselator

public javax.media.opengl.glu.GLUtessellator getTesselator()
Deprecated. 
Gets the tesselator.

Returns:
the tesselator