|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.j3d.utils.geometry.compression.GeneralizedStrip
class GeneralizedStrip
This class provides static methods to support topological transformations on generalized strips. This is used by the GeometryDecompressor. These methods only need to look at the vertex replacement flags to determine how the vertices in the strip are connected. The connections are rearranged in different ways to transform generalized strips to GeometryArray representations.
GeneralizedStripFlags
,
GeneralizedVertexList
,
GeometryDecompressor
Nested Class Summary | |
---|---|
(package private) static class |
GeneralizedStrip.IntList
The IntList is like an ArrayList, but avoids the Integer object wrapper and accessor overhead for simple lists of ints. |
(package private) static class |
GeneralizedStrip.StripArray
The StripArray class is used as the output of some conversion methods in the GeneralizedStrip class. |
Field Summary | |
---|---|
private static int |
CCW
|
private static int |
CW
|
private static boolean |
debug
|
private static int |
REPLACE_MIDDLE
|
private static int |
REPLACE_OLDEST
|
private static int |
RESTART_CCW
|
private static int |
RESTART_CW
|
Constructor Summary | |
---|---|
GeneralizedStrip()
|
Method Summary | |
---|---|
private static void |
addFan(GeneralizedStrip.IntList fanVerts,
GeneralizedStrip.IntList fanCounts,
int start,
int length,
int frontFace,
int winding,
boolean transition)
|
private static void |
addStrip(GeneralizedStrip.IntList stripVerts,
GeneralizedStrip.IntList stripCounts,
int start,
int length,
int frontFace,
int winding)
|
(package private) static int[] |
fansToTriangles(int[] stripCounts)
Breaks up triangle fans into separate triangles. |
private static int |
fansToTriangles(int tstart,
int[] tbuff,
int vstart,
int[] vertices,
int stripStart,
int[] stripCounts,
int stripCount)
|
(package private) static GeneralizedStrip.StripArray |
fanToStrips(int v,
int length,
int[] fans,
boolean convexPlanar)
Takes a fan and converts it to one or more strips. |
private static void |
fanToStrips(int v,
int length,
int[] fans,
GeneralizedStrip.IntList stripVerts,
GeneralizedStrip.IntList stripCounts,
boolean convexPlanar)
|
(package private) static int |
getLineCount(int[] stripCounts)
Counts the number of lines defined by arrays of line strips. |
(package private) static int |
getTriangleCount(GeneralizedStrip.IntList stripCounts)
Counts the number of triangles defined by arrays of triangle strips or fans. |
(package private) static int |
getTriangleCount(int[] stripCounts)
Counts the number of triangles defined by arrays of triangle strips or fans. |
(package private) static int[] |
stripsToTriangles(int[] stripCounts)
Breaks up triangle strips into separate triangles. |
private static int |
stripsToTriangles(int tstart,
int[] tbuff,
int vstart,
int[] vertices,
int stripStart,
int[] stripCounts,
int stripCount)
|
(package private) static GeneralizedStrip.StripArray |
toLineStrips(GeneralizedStripFlags vertices)
Interprets the vertex flags associated with a class implementing GeneralizedStripFlags, constructing and returning a StripArray. |
(package private) static GeneralizedStrip.StripArray[] |
toStripsAndFans(GeneralizedStripFlags vertices,
int frontFace)
Interprets the vertex flags associated with a class implementing GeneralizedStripFlags, constructing and returning a 2-element array of StripArray objects. |
private static void |
toStripsAndFans(GeneralizedStripFlags vertices,
int frontFace,
GeneralizedStrip.IntList stripVerts,
GeneralizedStrip.IntList stripCounts,
GeneralizedStrip.IntList fanVerts,
GeneralizedStrip.IntList fanCounts)
|
(package private) static GeneralizedStrip.StripArray[] |
toStripsAndTriangles(GeneralizedStripFlags vertices,
int frontFace,
int shortStripSize,
int maxShortStrips)
Interprets the vertex flags associated with a class implementing GeneralizedStripFlags, constructing and returning a 2-element array of StripArray objects. |
(package private) static int[] |
toTriangles(GeneralizedStripFlags vertices,
int frontFace)
Interprets the vertex flags associated with a class implementing GeneralizedStripFlags, constructing and returning an array of vertex references representing the original generalized strip as individual triangles. |
(package private) static GeneralizedStrip.StripArray |
toTriangleStrips(GeneralizedStripFlags vertices,
int frontFace)
Interprets the vertex flags associated with a class implementing GeneralizedStripFlags, constructing and returning a StripArray containing exclusively strips. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final boolean debug
private static final int CW
private static final int CCW
private static final int RESTART_CW
private static final int RESTART_CCW
private static final int REPLACE_MIDDLE
private static final int REPLACE_OLDEST
Constructor Detail |
---|
GeneralizedStrip()
Method Detail |
---|
static GeneralizedStrip.StripArray[] toStripsAndFans(GeneralizedStripFlags vertices, int frontFace)
vertices
- an object implementing GeneralizedStripFlagsfrontFace
- a flag, either GeneralizedStripFlags.FRONTFACE_CW or
GeneralizedStripFlags.FRONTFACE_CCW, indicating front face winding
private static void toStripsAndFans(GeneralizedStripFlags vertices, int frontFace, GeneralizedStrip.IntList stripVerts, GeneralizedStrip.IntList stripCounts, GeneralizedStrip.IntList fanVerts, GeneralizedStrip.IntList fanCounts)
private static void addStrip(GeneralizedStrip.IntList stripVerts, GeneralizedStrip.IntList stripCounts, int start, int length, int frontFace, int winding)
private static void addFan(GeneralizedStrip.IntList fanVerts, GeneralizedStrip.IntList fanCounts, int start, int length, int frontFace, int winding, boolean transition)
static GeneralizedStrip.StripArray toTriangleStrips(GeneralizedStripFlags vertices, int frontFace)
vertices
- an object implementing GeneralizedStripFlagsfrontFace
- a flag, either GeneralizedStripFlags.FRONTFACE_CW or
GeneralizedStripFlags.FRONTFACE_CCW, indicating front face winding
private static void fanToStrips(int v, int length, int[] fans, GeneralizedStrip.IntList stripVerts, GeneralizedStrip.IntList stripCounts, boolean convexPlanar)
static int[] toTriangles(GeneralizedStripFlags vertices, int frontFace)
vertices
- an object implementing GeneralizedStripFlagsfrontFace
- a flag, either GeneralizedStripFlags.FRONTFACE_CW or
GeneralizedStripFlags.FRONTFACE_CCW, indicating front face winding
private static int stripsToTriangles(int tstart, int[] tbuff, int vstart, int[] vertices, int stripStart, int[] stripCounts, int stripCount)
private static int fansToTriangles(int tstart, int[] tbuff, int vstart, int[] vertices, int stripStart, int[] stripCounts, int stripCount)
static GeneralizedStrip.StripArray[] toStripsAndTriangles(GeneralizedStripFlags vertices, int frontFace, int shortStripSize, int maxShortStrips)
vertices
- an object implementing GeneralizedStripFlagsfrontFace
- a flag, either GeneralizedStripFlags.FRONTFACE_CW or
GeneralizedStripFlags.FRONTFACE_CCW, indicating front face windingshortStripSize
- strips this size or less will be converted to
individual triangles if there are more than maxShortStrips of themmaxShortStrips
- maximum number of short strips allowed before
creating individual triangles
static GeneralizedStrip.StripArray toLineStrips(GeneralizedStripFlags vertices)
vertices
- an object implementing GeneralizedStripFlags
static int getLineCount(int[] stripCounts)
stripCounts
- array of strip counts, as used by the
GeometryStripArray object
static int getTriangleCount(int[] stripCounts)
stripCounts
- array of strip counts, as used by the
GeometryStripArray object
static int getTriangleCount(GeneralizedStrip.IntList stripCounts)
stripCounts
- IntList of strip counts
static int[] stripsToTriangles(int[] stripCounts)
stripCounts
- array of strip counts, as used by the
GeometryStripArray object
static int[] fansToTriangles(int[] stripCounts)
stripCounts
- array of strip counts, as used by the
GeometryStripArray object
static GeneralizedStrip.StripArray fanToStrips(int v, int length, int[] fans, boolean convexPlanar)
v
- index into the fans array of the first vertex in the fanlength
- number of vertices in the fanfans
- array of vertex indices representing one or more fansconvexPlanar
- if true indicates that the fan is convex and
planar; such fans will always be converted into a single strip
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |