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 Details

  • Method Details

    • init

      public void init(boolean addCache, boolean strokeTess, boolean calcNorm, boolean clampXY)
    • begin

      public void begin(int type)
      Specified by:
      begin in interface PGL.TessellatorCallback
    • end

      public void end()
      Specified by:
      end in interface PGL.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:
      vertex in interface PGL.TessellatorCallback
    • error

      public void error(int errnum)
      Specified by:
      error in interface PGL.TessellatorCallback
    • combine

      public void combine(double[] coords, Object[] data, float[] weight, Object[] outData)
      Implementation of the GLU_TESS_COMBINE callback.
      Specified by:
      combine in interface PGL.TessellatorCallback
      Parameters:
      coords - is the 3-vector of the new vertex
      data - 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.