Package com.sun.j3d.utils.geometry
Class Triangulator
- java.lang.Object
-
- com.sun.j3d.utils.geometry.Triangulator
-
public class Triangulator extends java.lang.Object
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.- See Also:
GeometryInfo
-
-
Constructor Summary
Constructors Constructor Description Triangulator()
Deprecated.This class is created automatically when needed in GeometryInfo and never needs to be used directly.Triangulator(int earOrder)
Deprecated.This class is created automatically when needed in GeometryInfo and never needs to be used directly.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
triangulate(GeometryInfo gi)
This routine converts the GeometryInfo object from primitive type POLYGON_ARRAY to primitive type TRIANGLE_ARRAY using polygon decomposition techniques.
-
-
-
Constructor Detail
-
Triangulator
public Triangulator()
Deprecated.This class is created automatically when needed in GeometryInfo and never needs to be used directly. Putting data into a GeometryInfo with primitive POLYGON_ARRAY automatically causes the triangulator to be created and used.Creates a new instance of the Triangulator.
-
Triangulator
public Triangulator(int earOrder)
Deprecated.This class is created automatically when needed in GeometryInfo and never needs to be used directly. Putting data into a GeometryInfo with primitive POLYGON_ARRAY automatically causes the triangulator to be created and used.Creates a new instance of a Triangulator.
-
-
Method Detail
-
triangulate
public void triangulate(GeometryInfo gi)
This routine converts the GeometryInfo object from primitive type POLYGON_ARRAY to primitive type TRIANGLE_ARRAY using polygon decomposition techniques.Example of usage: Triangulator tr = new Triangulator(); tr.triangulate(ginfo); // ginfo contains the geometry. shape.setGeometry(ginfo.getGeometryArray()); // shape is a Shape3D.
- Parameters:
gi
- Geometry to be triangulated
-
-