|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.j3d.utils.geometry.compression.GeneralizedVertexList
class GeneralizedVertexList
The GeneralizedVertexList class is a variable-size list used to collect the vertices for a generalized strip of points, lines, or triangles. This is used by the GeometryDecompressor. This class implements the GeneralizedStripFlags interface and provides methods for copying instance vertex data into various fixed-size GeometryArray representations.
GeneralizedStrip
,
GeometryDecompressor
Nested Class Summary | |
---|---|
(package private) class |
GeneralizedVertexList.Vertex
A class with fields corresponding to all the data that can be bundled with the vertices of generalized strips. |
Field Summary | |
---|---|
private int |
frontFace
|
private boolean |
hasColor3
|
private boolean |
hasColor4
|
private boolean |
hasNormals
|
(package private) int |
stripCount
Count of number of strips generated after conversion to GeometryArray. |
(package private) int |
triangleCount
Count of number of triangles generated after conversion to GeometryArray. |
(package private) int |
vertexCount
Count of number of vertices generated after conversion to GeometryArray. |
(package private) int |
vertexFormat
Bits describing the data bundled with each vertex. |
private java.util.ArrayList |
vertices
|
Fields inherited from interface com.sun.j3d.utils.geometry.compression.GeneralizedStripFlags |
---|
FRONTFACE_CCW, FRONTFACE_CW, REPLACE_MIDDLE, REPLACE_OLDEST, RESTART_CCW, RESTART_CW |
Constructor Summary | |
---|---|
GeneralizedVertexList(int vertexFormat,
int frontFace)
Creates a new GeneralizedVertexList for the specified vertex format. |
|
GeneralizedVertexList(int vertexFormat,
int frontFace,
int initSize)
Creates a new GeneralizedVertexList for the specified vertex format. |
Method Summary | |
---|---|
(package private) void |
addVertex(Point3f pos,
Vector3f norm,
Color4f color,
int flag)
Copy vertex data to a new Vertex object and add it to this list. |
private void |
copyVertexData(GeometryArray ga,
GeneralizedStrip.IntList indices)
|
int |
getFlag(int index)
Return the flag associated with the vertex at the specified index. |
int |
getFlagCount()
Return the number of flags. |
(package private) void |
setVertexFormat(int vertexFormat)
Sets the vertex format for this vertex list. |
(package private) int |
size()
Return the number of vertices in this list. |
(package private) LineStripArray |
toLineStripArray()
Output a LineStripArray. |
(package private) PointArray |
toPointArray()
Output a PointArray. |
(package private) GeometryStripArray[] |
toStripAndFanArrays()
Output triangle strip and triangle fan arrays. |
(package private) GeometryArray[] |
toStripAndTriangleArrays()
Output triangle strip and and triangle arrays. |
(package private) TriangleArray |
toTriangleArray()
Output a TriangleArray. |
(package private) TriangleStripArray |
toTriangleStripArray()
Output a TriangleStripArray. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.ArrayList vertices
private boolean hasColor3
private boolean hasColor4
private boolean hasNormals
private int frontFace
int stripCount
int vertexCount
int triangleCount
int vertexFormat
Constructor Detail |
---|
GeneralizedVertexList(int vertexFormat, int frontFace, int initSize)
vertexFormat
- a mask indicating which components are
present in each vertex, as used by GeometryArray.frontFace
- a flag, either GeneralizedStripFlags.FRONTFACE_CW or
GeneralizedStripFlags.FRONTFACE_CCW, indicating front face windinginitSize
- initial number of elementsGeometryArray
GeneralizedVertexList(int vertexFormat, int frontFace)
vertexFormat
- a mask indicating which components are
present in each vertex, as used by GeometryArray.frontFace
- a flag, either GeneralizedStripFlags.FRONTFACE_CW or
GeneralizedStripFlags.FRONTFACE_CCW, indicating front face windingGeometryArray
Method Detail |
---|
void setVertexFormat(int vertexFormat)
vertexFormat
- a mask indicating which components are
present in each vertex, as used by GeometryArray.void addVertex(Point3f pos, Vector3f norm, Color4f color, int flag)
int size()
public int getFlagCount()
GeneralizedStripFlags
getFlagCount
in interface GeneralizedStripFlags
public int getFlag(int index)
GeneralizedStripFlags
getFlag
in interface GeneralizedStripFlags
private void copyVertexData(GeometryArray ga, GeneralizedStrip.IntList indices)
PointArray toPointArray()
TriangleArray toTriangleArray()
LineStripArray toLineStripArray()
TriangleStripArray toTriangleStripArray()
GeometryStripArray[] toStripAndFanArrays()
GeometryArray[] toStripAndTriangleArrays()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |