net.nexttext.renderer.util
Class Triangulator

java.lang.Object
  extended by net.nexttext.renderer.util.DoublyConnectedEdgeList<TriangulationVertex,TriangulationEdge>
      extended by net.nexttext.renderer.util.Triangulator

public class Triangulator
extends DoublyConnectedEdgeList<TriangulationVertex,TriangulationEdge>

Triangulator.


Field Summary
static processing.core.PVector UNIT_X
           
 
Constructor Summary
Triangulator()
           
 
Method Summary
 TriangulationEdge createEdge(TriangulationVertex origin, boolean real)
           
static java.nio.IntBuffer createIntBuffer(int size)
          Create a new IntBuffer of the specified size.
 TriangulationVertex createVertex(int index, processing.core.PVector p)
           
 java.util.ArrayList<TriangulationEdge> getEdges()
           
 java.nio.IntBuffer triangulate()
          Triangulate.
 java.nio.IntBuffer triangulate(boolean cleanrun)
          Triangulate from a fresh start if cleanrun is true.
 
Methods inherited from class net.nexttext.renderer.util.DoublyConnectedEdgeList
addEdge, addVertex, getVertices
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNIT_X

public static final processing.core.PVector UNIT_X
Constructor Detail

Triangulator

public Triangulator()
Method Detail

triangulate

public java.nio.IntBuffer triangulate(boolean cleanrun)
Triangulate from a fresh start if cleanrun is true.

Parameters:
cleanrun -
Returns:
index buffer of triangles

triangulate

public java.nio.IntBuffer triangulate()
Triangulate.

Returns:
index buffer of triangles.

createIntBuffer

public static java.nio.IntBuffer createIntBuffer(int size)
Create a new IntBuffer of the specified size.

Parameters:
size - required number of ints to store.
Returns:
the new IntBuffer

createEdge

public TriangulationEdge createEdge(TriangulationVertex origin,
                                    boolean real)
Specified by:
createEdge in class DoublyConnectedEdgeList<TriangulationVertex,TriangulationEdge>

createVertex

public TriangulationVertex createVertex(int index,
                                        processing.core.PVector p)
Specified by:
createVertex in class DoublyConnectedEdgeList<TriangulationVertex,TriangulationEdge>

getEdges

public java.util.ArrayList<TriangulationEdge> getEdges()