|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.media.opengl.glu.GLUtessellatorCallbackAdapter
org.mt4j.util.opengl.GluTrianglulator
public class GluTrianglulator
This tesselator produces no triangle strips/fans but only pure triangles.
| Constructor Summary | |
|---|---|
GluTrianglulator(processing.core.PApplet p)Creates a new GLU tesselator object and defines callback methods, which the tesselator will later call. |
|
| Method Summary | |
|---|---|
void |
begin(int type) |
void |
combine(double[] coords, java.lang.Object[] data, float[] weight, java.lang.Object[] outData)CombineCallback is used to create a new vertex when edges intersect. |
void |
deleteTess()Delete tess. |
void |
edgeFlag(boolean boundaryEdge) |
void |
end() |
void |
error(int errnum) |
javax.media.opengl.glu.GLUtessellator |
getTesselator()Gets the tesselator. |
java.util.List<Vertex> |
getTriList()Gets the tri list. |
java.util.List<Vertex> |
tesselate(java.util.List<Vertex[]> contours)Tesselate. |
java.util.List<Vertex> |
tesselate(java.util.List<Vertex[]> contours, int windingRule)Triangulates the given vertex contours and returns a list of triangles. |
java.util.List<Vertex> |
tesselate(Vertex[] contour, int windingRule)Tesselates/triangulates the given contours with the given winding rule (ie. |
MTTriangleMesh |
toTriangleMesh(java.util.List<Vertex[]> contours, int windingRule)Triangulates the given vertex arrays and creates a single triangle mesh. |
void |
vertex(java.lang.Object vertexData)Callback function. |
void |
vertexData(java.lang.Object vertexData, java.lang.Object polygonData) |
| Methods inherited from class javax.media.opengl.glu.GLUtessellatorCallbackAdapter |
|---|
beginData, combineData, edgeFlagData, endData, errorData |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GluTrianglulator(processing.core.PApplet p)
p - the processing context| Method Detail |
|---|
public void edgeFlag(boolean boundaryEdge)
edgeFlag in interface javax.media.opengl.glu.GLUtessellatorCallback
edgeFlag in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter
public void deleteTess()
public MTTriangleMesh toTriangleMesh(java.util.List<Vertex[]> contours,
int windingRule)
contours - the contourswindingRule - the winding rule
public java.util.List<Vertex> tesselate(Vertex[] contour,
int windingRule)
contour - the contourwindingRule - the winding rulepublic java.util.List<Vertex> tesselate(java.util.List<Vertex[]> contours)
contours - the contours
public java.util.List<Vertex> tesselate(java.util.List<Vertex[]> contours,
int windingRule)
contours - the vertex arrays to triangulate into one list of triangleswindingRule - the winding rule which determines which parts of the specified shape is "inside" or "outside" the shape.exmaple GLU.GLU_TESS_WINDING_ODD the produced trianglespublic void begin(int type)
begin in interface javax.media.opengl.glu.GLUtessellatorCallback
begin in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter
public void vertex(java.lang.Object vertexData)
vertex in interface javax.media.opengl.glu.GLUtessellatorCallback
vertex in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter
vertexData - the vertex data
public void vertexData(java.lang.Object vertexData,
java.lang.Object polygonData)
vertexData in interface javax.media.opengl.glu.GLUtessellatorCallback
vertexData in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter
public void combine(double[] coords,
java.lang.Object[] data,
float[] weight,
java.lang.Object[] outData)
This is called before the call to the vertex-callback method,
combine in interface javax.media.opengl.glu.GLUtessellatorCallback
combine in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter
coords - the coordsdata - the dataweight - the weightoutData - the out datapublic void end()
end in interface javax.media.opengl.glu.GLUtessellatorCallback
end in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter
public void error(int errnum)
error in interface javax.media.opengl.glu.GLUtessellatorCallback
error in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter
public javax.media.opengl.glu.GLUtessellator getTesselator()
public java.util.List<Vertex> getTriList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||