| java.lang.Object com.sun.j3d.utils.geometry.Triangulator
Triangulator | public class Triangulator extends Object (Code) | | 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 | |
public | Triangulator() Creates a new instance of the Triangulator. | public | Triangulator(int earOrder) Creates a new instance of a Triangulator. |
Method Summary | |
void | deleteHook(int currLoop) | void | deleteLinks(int ind) | int | fetchData(int ind1) | int | fetchNextData(int ind1) Returns pointer to the successor of ind1. | int | fetchPrevData(int ind1) returns pointer to the successor of ind1. | int | getAngle(int ind) | int | getNextChain(boolean[] done) | int | getNode() | boolean | inLoopList(int loop) | boolean | inPointsList(int index) | boolean | inPolyList(int ind) | void | initPnts(int number) | void | insertAfter(int ind1, int ind2) Inserts node ind2 after node ind1. | int | makeHook() Allocates storage for a dummy list node; pointers are set to itself. | int | makeLoopHeader() | int | makeNode(int index) Allocates storage for a new list node, and stores the index of the point
at this node. | void | preProcessList(int i1) | void | printListData() | void | printVtxList() | void | resetPolyList(int ind) | void | rotateLinks(int ind1, int ind2) | void | setAngle(int ind, int convex) | void | setEpsilon(double eps) | void | splitSplice(int ind1, int ind2, int ind3, int ind4) | void | storeChain(int ind) | int | storePoint(double x, double y) | void | storeTriangle(int i, int j, int k) | void | swapLinks(int ind1) swap the list pointers in order to change the orientation. | 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. | void | updateIndex(int ind, int index) | void | writeTriangleToGeomInfo() |
EARS_RANDOM | final static int EARS_RANDOM(Code) | | |
EARS_SEQUENCE | final static int EARS_SEQUENCE(Code) | | |
EARS_SORTED | final static int EARS_SORTED(Code) | | |
INC_DIST_BK | final static int INC_DIST_BK(Code) | | |
INC_LIST_BK | final static int INC_LIST_BK(Code) | | |
INC_LOOP_BK | final static int INC_LOOP_BK(Code) | | |
INC_POINT_BK | final static int INC_POINT_BK(Code) | | |
INC_TRI_BK | final static int INC_TRI_BK(Code) | | |
ZERO | final static double ZERO(Code) | | |
earsRandom | boolean earsRandom(Code) | | |
earsSorted | boolean earsSorted(Code) | | |
loopMinloopMax | int loopMinloopMax(Code) | | |
maxNumChains | int maxNumChains(Code) | | |
maxNumDist | int maxNumDist(Code) | | |
maxNumHeap | int maxNumHeap(Code) | | |
maxNumLeftMost | int maxNumLeftMost(Code) | | |
maxNumList | int maxNumList(Code) | | |
maxNumLoops | int maxNumLoops(Code) | | |
maxNumPUnsorted | int maxNumPUnsorted(Code) | | |
maxNumPoints | int maxNumPoints(Code) | | |
maxNumPolyArea | int maxNumPolyArea(Code) | | |
maxNumTriangles | int maxNumTriangles(Code) | | |
noHashingEdges | boolean noHashingEdges(Code) | | |
noHashingPnts | boolean noHashingPnts(Code) | | |
normals | Vector3f normals(Code) | | |
numTexSets | int numTexSets(Code) | | |
numTriangles | int numTriangles(Code) | | |
numVtxList | int numVtxList(Code) | | |
pUnsorted | Point2f[] pUnsorted(Code) | | |
polyArea | double polyArea(Code) | | |
reflexVertices | int reflexVertices(Code) | | |
stripCounts | int stripCounts(Code) | | |
vertexIndices | int vertexIndices(Code) | | |
vertices | Point3f vertices(Code) | | |
Triangulator | public Triangulator()(Code) | | Creates a new instance of the Triangulator.
|
Triangulator | public Triangulator(int earOrder)(Code) | | Creates a new instance of a Triangulator.
|
deleteHook | void deleteHook(int currLoop)(Code) | | |
deleteLinks | void deleteLinks(int ind)(Code) | | Deletes node ind from list (with destroying its data fields)
|
fetchData | int fetchData(int ind1)(Code) | | obtains the data store at ind1
|
fetchNextData | int fetchNextData(int ind1)(Code) | | Returns pointer to the successor of ind1.
|
fetchPrevData | int fetchPrevData(int ind1)(Code) | | returns pointer to the successor of ind1.
|
getAngle | int getAngle(int ind)(Code) | | |
getNextChain | int getNextChain(boolean[] done)(Code) | | |
inLoopList | boolean inLoopList(int loop)(Code) | | |
inPointsList | boolean inPointsList(int index)(Code) | | |
inPolyList | boolean inPolyList(int ind)(Code) | | |
initPnts | void initPnts(int number)(Code) | | |
insertAfter | void insertAfter(int ind1, int ind2)(Code) | | Inserts node ind2 after node ind1.
|
makeHook | int makeHook()(Code) | | Allocates storage for a dummy list node; pointers are set to itself.
pointer to node |
makeLoopHeader | int makeLoopHeader()(Code) | | |
makeNode | int makeNode(int index)(Code) | | Allocates storage for a new list node, and stores the index of the point
at this node. Pointers are set to -1.
pointer to node |
preProcessList | void preProcessList(int i1)(Code) | | |
printListData | void printListData()(Code) | | |
printVtxList | void printVtxList()(Code) | | |
resetPolyList | void resetPolyList(int ind)(Code) | | |
rotateLinks | void rotateLinks(int ind1, int ind2)(Code) | | |
setAngle | void setAngle(int ind, int convex)(Code) | | |
setEpsilon | void setEpsilon(double eps)(Code) | | |
splitSplice | void splitSplice(int ind1, int ind2, int ind3, int ind4)(Code) | | |
storeChain | void storeChain(int ind)(Code) | | |
storePoint | int storePoint(double x, double y)(Code) | | |
storeTriangle | void storeTriangle(int i, int j, int k)(Code) | | |
swapLinks | void swapLinks(int ind1)(Code) | | swap the list pointers in order to change the orientation.
|
triangulate | public void triangulate(GeometryInfo gi)(Code) | | 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 |
updateIndex | void updateIndex(int ind, int index)(Code) | | |
writeTriangleToGeomInfo | void writeTriangleToGeomInfo()(Code) | | |
|
|