|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.j3d.GeometryDecompressor
javax.media.j3d.GeometryDecompressorShape3D
class GeometryDecompressorShape3D
This class implements a Shape3D backend for the abstract GeometryDecompressor.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.media.j3d.GeometryDecompressor |
---|
GeometryDecompressor.HuffmanTableEntry, GeometryDecompressor.MeshBufferEntry |
Field Summary | |
---|---|
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
|
Fields inherited from class javax.media.j3d.GeometryDecompressor |
---|
majorVersionNumber, minorMinorVersionNumber, minorVersionNumber |
Constructor Summary | |
---|---|
GeometryDecompressorShape3D()
|
Method Summary | |
---|---|
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. |
Methods inherited from class javax.media.j3d.GeometryDecompressor |
---|
checkVersion, decompress |
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 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
Constructor Detail |
---|
GeometryDecompressorShape3D()
Method Detail |
---|
Shape3D[] toTriangleArrays(CompressedGeometryRetained cgr)
cgr
- CompressedGeometryRetained object with compressed geometry
CompressedGeometry
,
GeometryDecompressor
Shape3D[] toTriangleStripArrays(CompressedGeometryRetained cgr)
cgr
- CompressedGeometryRetained object with compressed geometry
CompressedGeometry
,
GeometryDecompressor
Shape3D[] toStripAndFanArrays(CompressedGeometryRetained cgr)
cgr
- CompressedGeometryRetained object with compressed geometry
CompressedGeometry
,
GeometryDecompressor
Shape3D[] toStripAndTriangleArrays(CompressedGeometryRetained cgr)
cgr
- CompressedGeometryRetained object with compressed geometry
CompressedGeometry
,
GeometryDecompressor
private Shape3D[] decompress(CompressedGeometryRetained cgr, int triOutputType)
void outputVertexFormat(boolean bundlingNorm, boolean bundlingColor, boolean doingAlpha)
outputVertexFormat
in class GeometryDecompressor
bundlingNorm
- 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 GeometryDecompressor
position
- 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
,
CompressedGeometryHeader
void outputColor(Color4f color)
outputColor
in class GeometryDecompressor
color
- The current global color.void outputNormal(Vector3f normal)
outputNormal
in class GeometryDecompressor
normal
- The current global normal.private void addShape3D()
private void beginPrint()
private void endPrint()
private void printBench()
private void printStats()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |