class GeometryDecompressorShape3D extends GeometryDecompressor
GeometryDecompressor.HuffmanTableEntry, GeometryDecompressor.MeshBufferEntry| Modifier and Type | Field and Description |
|---|---|
private static boolean |
benchmark |
private int |
bufferDataType |
private Color4f |
curColor |
private Vector3f |
curNormal |
private int |
dataPresent |
private static boolean |
debug |
private long |
endTime |
private static int |
FRONTFACE_CCW |
private int |
origVertexCount |
private static boolean |
printInfo |
private java.util.ArrayList |
shapes |
private long |
startTime |
private static boolean |
statistics |
private int |
stripCount |
private static int |
TRI_SET |
private static int |
TRI_STRIP_AND_FAN_SET |
private static int |
TRI_STRIP_AND_TRI_SET |
private static int |
TRI_STRIP_SET |
private int |
triangleCount |
private int |
triOutputType |
private static int |
TYPE_LINE |
private static int |
TYPE_POINT |
private static int |
TYPE_TRIANGLE |
private int |
vertexCount |
private GeneralizedVertexList |
vlist |
majorVersionNumber, minorMinorVersionNumber, minorVersionNumber| Constructor and Description |
|---|
GeometryDecompressorShape3D() |
| Modifier and Type | Method and Description |
|---|---|
private void |
addShape3D()
Create a Shape3D object of the desired type from the current vertex
list.
|
private void |
beginPrint() |
private Shape3D[] |
decompress(CompressedGeometryRetained cgr,
int triOutputType)
Decompress the data contained in a CompressedGeometryRetained and
return an array of Shape3D objects using the specified triangle output
type.
|
private void |
endPrint() |
(package private) void |
outputColor(Color4f color)
Create a Shape3D using the current color for both the ambient and
diffuse material colors, then start a new vertex list for the new
color.
|
(package private) void |
outputNormal(Vector3f normal)
Set the current normal that will be copied to each succeeding vertex
output by the decompressor.
|
(package private) void |
outputVertex(Point3f position,
Vector3f normal,
Color4f color,
int vertexReplaceCode)
Add a new decompressed vertex to the current list.
|
(package private) void |
outputVertexFormat(boolean bundlingNorm,
boolean bundlingColor,
boolean doingAlpha)
Initialize the vertex output list based on the vertex format provided
by the SetState decompression command.
|
private void |
printBench() |
private void |
printStats() |
(package private) Shape3D[] |
toStripAndFanArrays(CompressedGeometryRetained cgr)
Decompress the given compressed geometry.
|
(package private) Shape3D[] |
toStripAndTriangleArrays(CompressedGeometryRetained cgr)
Decompress the given compressed geometry.
|
(package private) Shape3D[] |
toTriangleArrays(CompressedGeometryRetained cgr)
Decompress the given compressed geometry.
|
(package private) Shape3D[] |
toTriangleStripArrays(CompressedGeometryRetained cgr)
Decompress the given compressed geometry.
|
checkVersion, decompressprivate static final boolean debug
private static final boolean benchmark
private static final boolean statistics
private static final boolean printInfo
private int bufferDataType
private int dataPresent
private GeneralizedVertexList vlist
private java.util.ArrayList shapes
private Color4f curColor
private Vector3f curNormal
private int origVertexCount
private int stripCount
private int vertexCount
private int triangleCount
private long startTime
private long endTime
private int triOutputType
private static final int TRI_SET
private static final int TRI_STRIP_SET
private static final int TRI_STRIP_AND_FAN_SET
private static final int TRI_STRIP_AND_TRI_SET
private static final int TYPE_POINT
private static final int TYPE_LINE
private static final int TYPE_TRIANGLE
private static final int FRONTFACE_CCW
Shape3D[] toTriangleArrays(CompressedGeometryRetained cgr)
cgr - CompressedGeometryRetained object with compressed geometryCompressedGeometry,
GeometryDecompressorShape3D[] toTriangleStripArrays(CompressedGeometryRetained cgr)
cgr - CompressedGeometryRetained object with compressed geometryCompressedGeometry,
GeometryDecompressorShape3D[] toStripAndFanArrays(CompressedGeometryRetained cgr)
cgr - CompressedGeometryRetained object with compressed geometryCompressedGeometry,
GeometryDecompressorShape3D[] toStripAndTriangleArrays(CompressedGeometryRetained cgr)
cgr - CompressedGeometryRetained object with compressed geometryCompressedGeometry,
GeometryDecompressorprivate Shape3D[] decompress(CompressedGeometryRetained cgr, int triOutputType)
void outputVertexFormat(boolean bundlingNorm,
boolean bundlingColor,
boolean doingAlpha)
outputVertexFormat in class GeometryDecompressorbundlingNorm - true indicates normals are bundled with verticesbundlingColor - true indicates colors are bundled with verticesdoingAlpha - true indicates alpha values are bundled with verticesvoid outputVertex(Point3f position, Vector3f normal, Color4f color, int vertexReplaceCode)
outputVertex in class GeometryDecompressorposition - The coordinates of the vertex.normal - The normal bundled with the vertex. May be null.color - The color bundled with the vertex. May be null.
Alpha may be present.vertexReplaceCode - Specifies the generalized strip flag
that is bundled with each vertex.GeneralizedStripFlags,
CompressedGeometryHeadervoid outputColor(Color4f color)
outputColor in class GeometryDecompressorcolor - The current global color.void outputNormal(Vector3f normal)
outputNormal in class GeometryDecompressornormal - The current global normal.private void addShape3D()
private void beginPrint()
private void endPrint()
private void printBench()
private void printStats()
Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.