class GeneralizedStrip
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
(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.
|
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
GeneralizedStrip() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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
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 windingprivate 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 windingprivate 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 windingprivate 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 trianglesstatic GeneralizedStrip.StripArray toLineStrips(GeneralizedStripFlags vertices)
vertices - an object implementing GeneralizedStripFlagsstatic int getLineCount(int[] stripCounts)
stripCounts - array of strip counts, as used by the
GeometryStripArray objectstatic int getTriangleCount(int[] stripCounts)
stripCounts - array of strip counts, as used by the
GeometryStripArray objectstatic int getTriangleCount(GeneralizedStrip.IntList stripCounts)
stripCounts - IntList of strip countsstatic int[] stripsToTriangles(int[] stripCounts)
stripCounts - array of strip counts, as used by the
GeometryStripArray objectstatic int[] fansToTriangles(int[] stripCounts)
stripCounts - array of strip counts, as used by the
GeometryStripArray objectstatic 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 stripCopyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.