|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.j3d.utils.geometry.Stripifier
public class Stripifier
The Stripifier utility will change the primitive of the GeometryInfo object to Triangle Strips. The strips are made by analyzing the triangles in the original data and connecting them together.
Normal Generation should be performed on the GeometryInfo object before Stripification, for best results. Example:
GeometryInfo gi = new GeometryInfo(TRIANGLE_ARRAY); gi.setCoordinates(coordinateData); NormalGenerator ng = new NormalGenerator(); ng.generateNormals(gi); Stripifier st = new Stripifier() st.stripify(gi); Shape3D part = new Shape3D(); part.setAppearance(appearance); part.setGeometry(gi.getGeometryArray());
Nested Class Summary | |
---|---|
(package private) class |
Stripifier.Edge
Stores the information about an edge of a triangle |
(package private) class |
Stripifier.Face
Stores the information about the face of a triangle |
(package private) class |
Stripifier.Istream
|
(package private) class |
Stripifier.Node
stores the information for a face node |
(package private) class |
Stripifier.SortedList
sorts the Nodes by depth |
(package private) class |
Stripifier.Vertex
Stores the infomration about a vertex |
Field Summary | |
---|---|
(package private) boolean |
CHECK_ORIENT
|
static int |
COLLECT_STATS
Indicates to the stripifier to collect statistics on the data |
(package private) boolean |
colorStrips
|
(package private) boolean |
DEBUG
|
(package private) static int |
EMPTY
|
(package private) boolean |
hasColors
|
(package private) boolean |
hasNormals
|
(package private) boolean |
hasTextures
|
(package private) int[] |
numNhbrs
|
(package private) StripifierStats |
stats
|
(package private) int |
texSetCount
|
Constructor Summary | |
---|---|
Stripifier()
Creates the Stripifier object. |
|
Stripifier(int flags)
Creates the Stripifier object. |
Method Summary | |
---|---|
(package private) void |
buildAdjacencies(Stripifier.Edge[] edges,
Stripifier.Face[] faces)
Builds the adjacency graph by finding the neighbors of the edges |
(package private) boolean |
checkOrientCCWSeq(Stripifier.Vertex last,
Stripifier.Vertex prev,
Stripifier.Face face)
|
(package private) boolean |
checkOrientCWSeq(Stripifier.Vertex last,
Stripifier.Vertex prev,
Stripifier.Face face)
|
(package private) void |
concatenate(java.util.ArrayList strips,
Stripifier.Face[] faces)
joins tristrips if their end triangles neighbor each other. |
(package private) Stripifier.Edge[] |
createEdgeArray(Stripifier.Face[] faces)
Creates an array of edges from the Face array. |
(package private) Stripifier.Face[] |
createFaceArray(GeometryInfo gi)
Creates an array of faces from the geometry in the GeometryInfo object. |
(package private) Stripifier.Node[] |
dfSearch(Stripifier.Face[] faces,
Stripifier.Node[] faceNodes)
|
(package private) int |
findNext(Stripifier.Node node,
Stripifier.Node[] faceNodes,
Stripifier.Face[] faces)
|
(package private) void |
freeNhbrTable()
|
(package private) Stripifier.Face |
getNextFace(java.util.ArrayList currStrip,
int index)
|
StripifierStats |
getStripifierStats()
Returns the stripifier stats object. |
(package private) java.util.ArrayList |
hamilton(Stripifier.Node[] sTree,
int[] numStrips,
int[] numPatches)
generates hamiltonian strips from the derived binary spanning tree using the path peeling algorithm to peel off any node wiht double children in a bottom up fashion. |
(package private) Stripifier.Node[] |
hybridSearch(Stripifier.Face[] faces,
Stripifier.Node[] faceNodes)
Takes a list of faces as input and performs a hybrid search, a variated depth first search that returns to the highest level node not yet fully explored. |
(package private) boolean |
orientSeq(boolean ccw,
Stripifier.Istream stream,
Stripifier.Face face)
|
(package private) boolean |
orientZAT(boolean ccw,
Stripifier.Istream stream,
Stripifier.Face face)
|
(package private) void |
putBackData(GeometryInfo gi,
java.util.ArrayList strips)
puts the stripified data back into the GeometryInfo object |
(package private) void |
quickSortEdges(Stripifier.Edge[] edges,
int l,
int r)
uses quicksort to sort the edges |
(package private) void |
reduceCostByOne(java.util.ArrayList strips,
Stripifier.Face[] faces,
int[] faceTable)
find all links that reduce cost by 1 |
(package private) void |
reduceCostByTwo(java.util.ArrayList strips,
Stripifier.Face[] faces,
int[] faceTable)
find all the links that reduce the cost by 2 |
(package private) void |
reduceCostByZero(java.util.ArrayList strips,
Stripifier.Face[] faces,
int[] faceTable)
find all the links that reduce the cost by 0 |
(package private) int |
resetNhbr(int y,
Stripifier.Face[] faces,
Stripifier.Node[] faceNodes)
|
(package private) boolean |
seq(Stripifier.Istream stream,
Stripifier.Face face,
int share)
|
(package private) void |
setNumNhbrs(Stripifier.Face[] faces)
|
(package private) void |
sortEdges(Stripifier.Edge[] edges)
Sorts the edges using BubbleSort |
(package private) boolean |
stripDone(java.util.ArrayList strip,
int count)
|
(package private) java.util.ArrayList |
stripe(java.util.ArrayList strips)
creates the triangle strips |
void |
stripify(GeometryInfo gi)
Converts the geometry contained in the GeometryInfo object into an array of triangle strips. |
(package private) void |
updateNumNhbrs(Stripifier.Node node)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final boolean DEBUG
final boolean CHECK_ORIENT
static final int EMPTY
boolean hasNormals
boolean hasTextures
int texSetCount
boolean hasColors
boolean colorStrips
StripifierStats stats
int[] numNhbrs
public static final int COLLECT_STATS
Constructor Detail |
---|
public Stripifier()
public Stripifier(int flags)
flags
- FlagsMethod Detail |
---|
public void stripify(GeometryInfo gi)
public StripifierStats getStripifierStats()
java.lang.IllegalStateException
- if the Stripfier has not
been constructed
with the COLLECT_STATS flagStripifier.Face[] createFaceArray(GeometryInfo gi)
Stripifier.Edge[] createEdgeArray(Stripifier.Face[] faces)
void buildAdjacencies(Stripifier.Edge[] edges, Stripifier.Face[] faces)
void sortEdges(Stripifier.Edge[] edges)
void quickSortEdges(Stripifier.Edge[] edges, int l, int r)
Stripifier.Node[] hybridSearch(Stripifier.Face[] faces, Stripifier.Node[] faceNodes)
Stripifier.Node[] dfSearch(Stripifier.Face[] faces, Stripifier.Node[] faceNodes)
int findNext(Stripifier.Node node, Stripifier.Node[] faceNodes, Stripifier.Face[] faces)
void setNumNhbrs(Stripifier.Face[] faces)
void freeNhbrTable()
void updateNumNhbrs(Stripifier.Node node)
int resetNhbr(int y, Stripifier.Face[] faces, Stripifier.Node[] faceNodes)
java.util.ArrayList hamilton(Stripifier.Node[] sTree, int[] numStrips, int[] numPatches)
java.util.ArrayList stripe(java.util.ArrayList strips)
boolean stripDone(java.util.ArrayList strip, int count)
boolean seq(Stripifier.Istream stream, Stripifier.Face face, int share)
boolean orientSeq(boolean ccw, Stripifier.Istream stream, Stripifier.Face face)
boolean orientZAT(boolean ccw, Stripifier.Istream stream, Stripifier.Face face)
boolean checkOrientCWSeq(Stripifier.Vertex last, Stripifier.Vertex prev, Stripifier.Face face)
boolean checkOrientCCWSeq(Stripifier.Vertex last, Stripifier.Vertex prev, Stripifier.Face face)
Stripifier.Face getNextFace(java.util.ArrayList currStrip, int index)
void concatenate(java.util.ArrayList strips, Stripifier.Face[] faces)
void reduceCostByTwo(java.util.ArrayList strips, Stripifier.Face[] faces, int[] faceTable)
void reduceCostByOne(java.util.ArrayList strips, Stripifier.Face[] faces, int[] faceTable)
void reduceCostByZero(java.util.ArrayList strips, Stripifier.Face[] faces, int[] faceTable)
void putBackData(GeometryInfo gi, java.util.ArrayList strips)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |