|
j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.j3d.geom.triangulation.Triangulator
public class Triangulator
Triangulator is a utility for turning arbitrary polygons into triangles so they can be rendered by Java 3D. Polygons can be concave, nonplanar, and can contain holes.
GeometryInfo| Constructor Summary | |
|---|---|
Triangulator()
Creates a new instance of the Triangulator. |
|
Triangulator(int earOrder)
Creates a new instance of a Triangulator. |
|
| Method Summary | |
|---|---|
void |
triangulate(GeometryInfo gi)
This routine converts the GeometryInfo object from primitive type POLYGON_ARRAY to primitive type TRIANGLE_ARRAY using polygon decomposition techniques. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Triangulator()
public Triangulator(int earOrder)
| Method Detail |
|---|
public void triangulate(GeometryInfo gi)
Example of usage: Triangulator tr = new Triangulator(); tr.triangulate(ginfo); // ginfo contains the geometry. shape.setGeometry(ginfo.getGeometryArray()); // shape is a Shape3D.
gi - Geometry to be triangulated
|
j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||