| java.lang.Object com.sun.j3d.utils.geometry.Stripifier
Stripifier | public class Stripifier (Code) | | 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());
|
Inner Class :class Vertex | |
Inner Class :class SortedList | |
Inner Class :class Istream | |
Constructor Summary | |
public | Stripifier() Creates the Stripifier object. | public | Stripifier(int flags) Creates the Stripifier object. |
Method Summary | |
void | buildAdjacencies(Edge[] edges, Face[] faces) | boolean | checkOrientCCWSeq(Vertex last, Vertex prev, Face face) | boolean | checkOrientCWSeq(Vertex last, Vertex prev, Face face) | void | concatenate(ArrayList strips, Face[] faces) joins tristrips if their end triangles neighbor each other. | Edge[] | createEdgeArray(Face[] faces) Creates an array of edges from the Face array. | Face[] | createFaceArray(GeometryInfo gi) Creates an array of faces from the geometry in the GeometryInfo object. | Node[] | dfSearch(Face[] faces, Node[] faceNodes) | int | findNext(Node node, Node[] faceNodes, Face[] faces) | void | freeNhbrTable() | Face | getNextFace(ArrayList currStrip, int index) | public StripifierStats | getStripifierStats() Returns the stripifier stats object. | ArrayList | hamilton(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. | Node[] | hybridSearch(Face[] faces, 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. | boolean | orientSeq(boolean ccw, Istream stream, Face face) | boolean | orientZAT(boolean ccw, Istream stream, Face face) | void | putBackData(GeometryInfo gi, ArrayList strips) | void | quickSortEdges(Edge[] edges, int l, int r) | void | reduceCostByOne(ArrayList strips, Face[] faces, int[] faceTable) | void | reduceCostByTwo(ArrayList strips, Face[] faces, int[] faceTable) | void | reduceCostByZero(ArrayList strips, Face[] faces, int[] faceTable) | int | resetNhbr(int y, Face[] faces, Node[] faceNodes) | boolean | seq(Istream stream, Face face, int share) | void | setNumNhbrs(Face[] faces) | void | sortEdges(Edge[] edges) | boolean | stripDone(ArrayList strip, int count) | ArrayList | stripe(ArrayList strips) | public void | stripify(GeometryInfo gi) Converts the geometry contained in the GeometryInfo object into an
array of triangle strips. | void | updateNumNhbrs(Node node) |
CHECK_ORIENT | final boolean CHECK_ORIENT(Code) | | |
COLLECT_STATS | final public static int COLLECT_STATS(Code) | | Indicates to the stripifier to collect statistics on the data
|
DEBUG | final boolean DEBUG(Code) | | |
EMPTY | final static int EMPTY(Code) | | |
colorStrips | boolean colorStrips(Code) | | |
hasColors | boolean hasColors(Code) | | |
hasNormals | boolean hasNormals(Code) | | |
hasTextures | boolean hasTextures(Code) | | |
texSetCount | int texSetCount(Code) | | |
Stripifier | public Stripifier()(Code) | | Creates the Stripifier object.
|
Stripifier | public Stripifier(int flags)(Code) | | Creates the Stripifier object.
Parameters: flags - Flags since: Java 3D 1.2.1 |
buildAdjacencies | void buildAdjacencies(Edge[] edges, Face[] faces)(Code) | | Builds the adjacency graph by finding the neighbors of the edges
|
checkOrientCCWSeq | boolean checkOrientCCWSeq(Vertex last, Vertex prev, Face face)(Code) | | |
checkOrientCWSeq | boolean checkOrientCWSeq(Vertex last, Vertex prev, Face face)(Code) | | |
concatenate | void concatenate(ArrayList strips, Face[] faces)(Code) | | joins tristrips if their end triangles neighbor each other. The
priority is performed in three stages: strips are concatenated to
save 2, 1, or no vertices
|
createEdgeArray | Edge[] createEdgeArray(Face[] faces)(Code) | | Creates an array of edges from the Face array.
|
createFaceArray | Face[] createFaceArray(GeometryInfo gi)(Code) | | Creates an array of faces from the geometry in the GeometryInfo object.
|
dfSearch | Node[] dfSearch(Face[] faces, Node[] faceNodes)(Code) | | |
findNext | int findNext(Node node, Node[] faceNodes, Face[] faces)(Code) | | |
freeNhbrTable | void freeNhbrTable()(Code) | | |
getStripifierStats | public StripifierStats getStripifierStats()(Code) | | Returns the stripifier stats object.
exception: IllegalStateException - if the Stripfier has notbeen constructedwith the COLLECT_STATS flag since: Java 3D 1.2.1 |
hamilton | ArrayList hamilton(Node[] sTree, int[] numStrips, int[] numPatches)(Code) | | 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. Returns a Vector of strips. Also
return the number of strips and patches in the numStrips and
numPatches "pointers"
|
hybridSearch | Node[] hybridSearch(Face[] faces, Node[] faceNodes)(Code) | | 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. Returns an array of pointers to the faces
found in order from the search. The faceNodes parameter is an
array of the Nodes created for the faces.
|
orientSeq | boolean orientSeq(boolean ccw, Istream stream, Face face)(Code) | | |
orientZAT | boolean orientZAT(boolean ccw, Istream stream, Face face)(Code) | | |
quickSortEdges | void quickSortEdges(Edge[] edges, int l, int r)(Code) | | uses quicksort to sort the edges
|
reduceCostByOne | void reduceCostByOne(ArrayList strips, Face[] faces, int[] faceTable)(Code) | | find all links that reduce cost by 1
|
reduceCostByTwo | void reduceCostByTwo(ArrayList strips, Face[] faces, int[] faceTable)(Code) | | find all the links that reduce the cost by 2
|
reduceCostByZero | void reduceCostByZero(ArrayList strips, Face[] faces, int[] faceTable)(Code) | | find all the links that reduce the cost by 0
|
resetNhbr | int resetNhbr(int y, Face[] faces, Node[] faceNodes)(Code) | | |
seq | boolean seq(Istream stream, Face face, int share)(Code) | | |
setNumNhbrs | void setNumNhbrs(Face[] faces)(Code) | | |
sortEdges | void sortEdges(Edge[] edges)(Code) | | Sorts the edges using BubbleSort
|
stripify | public void stripify(GeometryInfo gi)(Code) | | Converts the geometry contained in the GeometryInfo object into an
array of triangle strips.
|
updateNumNhbrs | void updateNumNhbrs(Node node)(Code) | | |
|
|