|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.j3d.utils.compression.CompressionStream
CompressionStream
.
public class CompressionStream
This class is used as input to a geometry compressor. It collects elements such as vertices, normals, colors, mesh references, and quantization parameters in an ordered stream. This stream is then traversed during the compression process and used to build the compressed output buffer.
GeometryCompressor
Nested Class Summary | |
---|---|
private class |
CompressionStream.ByCopyGeometry
Deprecated. This class implements the GeometryAccessor interface for geometry arrays accessed with by-copy semantics. |
private class |
CompressionStream.ByRefGeometry
Deprecated. This class implements the GeometryAccessor interface for non-interleaved geometry arrays accessed with by-reference semantics. |
private class |
CompressionStream.ByRefGeometryNIO
Deprecated. This class implements the GeometryAccessor interface for non-interleaved geometry arrays accessed with NIO. |
private class |
CompressionStream.ColorQuant
Deprecated. Stream element that sets color quantization during quantize pass. |
private static interface |
CompressionStream.GeometryAccessor
Deprecated. Interface to access GeometryArray vertex components and add them to the compression stream. |
private static class |
CompressionStream.IndexArrays
Deprecated. Class which holds index array references for a geometry array. |
private class |
CompressionStream.IndexedByCopyGeometry
Deprecated. This class implements the GeometryAccessor interface for indexed geometry arrays accessed with by-copy semantics. |
private class |
CompressionStream.IndexedByRefGeometry
Deprecated. This class implements the GeometryAccessor interface for indexed non-interleaved geometry arrays accessed with by-reference semantics. |
private class |
CompressionStream.IndexedByRefGeometryNIO
Deprecated. This class implements the GeometryAccessor interface for non-interleaved indexed geometry arrays accessed with NIO. |
private class |
CompressionStream.IndexedInterleavedGeometryFloat
Deprecated. This class implements the GeometryAccessor interface for indexed interleaved geometry arrays. |
private class |
CompressionStream.IndexedInterleavedGeometryNIO
Deprecated. This class implements the GeometryAccessor interface for indexed interleaved NIO geometry arrays. |
private class |
CompressionStream.InterleavedGeometry
Deprecated. This abstract class implements the GeometryAccessor interface for concrete subclasses which handle float and NIO interleaved geometry arrays. |
private class |
CompressionStream.InterleavedGeometryFloat
Deprecated. This class implements the GeometryAccessor interface for float interleaved geometry arrays. |
private class |
CompressionStream.InterleavedGeometryNIO
Deprecated. This class implements the GeometryAccessor interface for interleaved NIO geometry arrays. |
private class |
CompressionStream.MeshReference
Deprecated. Stream element that references the mesh buffer. |
private class |
CompressionStream.NormalQuant
Deprecated. Stream element that sets normal quantization during quantize pass. |
private class |
CompressionStream.PositionQuant
Deprecated. Stream element that sets position quantization during quantize pass. |
private static class |
CompressionStream.VertexCopy
Deprecated. |
private static class |
CompressionStream.VertexIndices
Deprecated. Class which holds indices for a specific vertex of an IndexedGeometryArray. |
Field Summary | |
---|---|
private static boolean |
benchmark
Deprecated. |
(package private) int |
byteCount
Deprecated. The total number of bytes used to create the uncompressed geometric elements in this stream, useful for performance analysis. |
(package private) static float |
ByteToFloatScale
Deprecated. Byte to float scale factor for scaling byte color components. |
private Color3f |
c3f
Deprecated. |
private Color4f |
c4f
Deprecated. |
(package private) double[] |
center
Deprecated. Center for normalizing positions to the unit cube. |
(package private) int |
colorQuant
Deprecated. Current color component (R, G, B, A) quantization value. |
(package private) boolean |
colorQuantChanged
Deprecated. Flag indicating color quantization change. |
private static boolean |
debug
Deprecated. |
(package private) boolean |
firstColor
Deprecated. Flag indicating the first color in this stream. |
(package private) boolean |
firstNormal
Deprecated. Flag indicating the first normal in this stream. |
(package private) boolean |
firstPosition
Deprecated. Flag indicating the first position in this stream. |
(package private) int[] |
lastColor
Deprecated. Last quantized color. |
private boolean |
lastElementColor
Deprecated. |
private boolean |
lastElementNormal
Deprecated. |
private boolean |
lastLastElementColor
Deprecated. |
private boolean |
lastLastElementNormal
Deprecated. |
(package private) int |
lastOctant
Deprecated. Last quantized normal's octant. |
(package private) int[] |
lastPosition
Deprecated. Last quantized position. |
(package private) int |
lastSextant
Deprecated. Last quantized normal's sextant. |
(package private) boolean |
lastSpecialNormal
Deprecated. Flag indicating last normal used a special encoding. |
(package private) int |
lastU
Deprecated. Last quantized normal's U encoding parameter. |
(package private) int |
lastV
Deprecated. Last quantized normal's V encoding parameter. |
(package private) Point3d[] |
mcBounds
Deprecated. Axes-aligned box enclosing all vertices in model coordinates. |
(package private) static int |
MESH_PUSH
Deprecated. This flag indicates that a vertex is to be pushed into the mesh buffer. |
(package private) MeshBuffer |
meshBuffer
Deprecated. Mesh buffer mirror used for computing deltas during quantization pass and a limited meshing algorithm for unstripped data. |
(package private) int |
meshReferenceCount
Deprecated. The number of mesh buffer references created for this stream. |
private Vector3f |
n3f
Deprecated. |
(package private) Point3d[] |
ncBounds
Deprecated. Axes-aligned box enclosing all vertices in normalized coordinates. |
(package private) static int |
NO_MESH_PUSH
Deprecated. This flag indicates that a vertex does not use the mesh buffer. |
private static boolean |
noMeshNormalSubstitution
Deprecated. |
(package private) int |
normalQuant
Deprecated. Current normal component (U and V) quantization value. |
(package private) boolean |
normalQuantChanged
Deprecated. Flag indicating normal quantization change. |
private Point3f |
p3f
Deprecated. |
(package private) int |
positionQuant
Deprecated. Current position component (X, Y, and Z) quantization value. |
(package private) boolean |
positionQuantChanged
Deprecated. Flag indicating position quantization change. |
(package private) double |
positionRangeMaximum
Deprecated. Maximum position range along the 3 axes. |
(package private) Point3i[] |
qcBounds
Deprecated. Axes-aligned box enclosing all vertices in quantized coordinates. |
(package private) static int |
REPLACE_MIDDLE
Deprecated. This flag indicates that the next triangle in the strip is defined by replacing the middle vertex of the previous triangle in the strip. |
(package private) static int |
REPLACE_OLDEST
Deprecated. This flag indicates that the next triangle in the strip is defined by replacing the oldest vertex of the previous triangle in the strip. |
(package private) static int |
RESTART
Deprecated. This flag indicates that a vertex starts a new triangle or line strip. |
(package private) double |
scale
Deprecated. Scale for normalizing positions to the unit cube. |
private java.util.Collection |
stream
Deprecated. |
(package private) int |
streamType
Deprecated. Type of this stream, either CompressedGeometryHeader.POINT_BUFFER, CompressedGeometryHeader.LINE_BUFFER, or CompressedGeometryHeader.TRIANGLE_BUFFER |
(package private) boolean |
vertexColor3
Deprecated. Boolean indicating RGB colors are bundled with the vertices. |
(package private) boolean |
vertexColor4
Deprecated. Boolean indicating RGBA colors are bundled with the vertices. |
(package private) boolean |
vertexColors
Deprecated. Boolean indicating colors are bundled with the vertices. |
(package private) int |
vertexComponents
Deprecated. A mask indicating which components are present in each vertex, as defined by GeometryArray. |
(package private) int |
vertexCount
Deprecated. The number of vertices created for this stream, excluding mesh buffer references. |
(package private) boolean |
vertexNormals
Deprecated. Boolean indicating normals are bundled with the vertices. |
(package private) boolean |
vertexTexture2
Deprecated. Boolean indicating that 2D texture coordinates are used. |
(package private) boolean |
vertexTexture3
Deprecated. Boolean indicating that 3D texture coordinates are used. |
(package private) boolean |
vertexTexture4
Deprecated. Boolean indicating that 4D texture coordinates are used. |
(package private) boolean |
vertexTextures
Deprecated. Boolean indicating texture coordinates are present. |
Constructor Summary | |
---|---|
private |
CompressionStream()
Deprecated. |
|
CompressionStream(GeometryInfo[] geometry)
Deprecated. Creates a CompressionStream from an array of GeometryInfo objects. |
(package private) |
CompressionStream(int streamType,
int vertexComponents)
Deprecated. Creates a new CompressionStream for the specified geometry type and vertex format. |
|
CompressionStream(int positionQuant,
int colorQuant,
int normalQuant,
GeometryInfo[] geometry)
Deprecated. Creates a CompressionStream from an array of GeometryInfo objects. |
|
CompressionStream(int positionQuant,
int colorQuant,
int normalQuant,
Shape3D[] shapes)
Deprecated. Creates a CompressionStream from an array of Shape3D scene graph objects. |
|
CompressionStream(Shape3D[] shapes)
Deprecated. Creates a CompressionStream from an array of Shape3D scene graph objects. |
Method Summary | |
---|---|
(package private) void |
addColor(Color3f c3f)
Deprecated. Copy the given color to the end of this stream and use it as a global state change that applies to all subsequent vertices. |
(package private) void |
addColor(Color4f c4f)
Deprecated. Copy the given color to the end of this stream and use it as a global state change that applies to all subsequent vertices. |
(package private) void |
addColorQuantization(int value)
Deprecated. Add a new color quantization value to the end of this stream that will apply to all subsequent colors. |
(package private) void |
addGeometryArray(GeometryArray ga)
Deprecated. Convert a GeometryArray to compression stream elements and add them to this stream. |
(package private) void |
addMeshReference(int stripFlag,
int meshIndex)
Deprecated. Add a mesh buffer reference to this stream. |
(package private) void |
addNormal(Vector3f n)
Deprecated. Copy the given normal to the end of this stream and use it as a global state change that applies to all subsequent vertices. |
(package private) void |
addNormalQuantization(int value)
Deprecated. Add a new normal quantization value to the end of this stream that will apply to all subsequent normals. |
(package private) void |
addPositionQuantization(int value)
Deprecated. Add a new position quantization value to the end of this stream that will apply to all subsequent vertex positions. |
(package private) void |
addVertex(Point3f pos,
Color3f color,
int stripFlag)
Deprecated. Copy vertex data and add it to the end of this stream. |
(package private) void |
addVertex(Point3f pos,
Color3f color,
int stripFlag,
int meshFlag)
Deprecated. Copy vertex data and add it to the end of this stream. |
(package private) void |
addVertex(Point3f pos,
Color4f color,
int stripFlag)
Deprecated. Copy vertex data and add it to the end of this stream. |
(package private) void |
addVertex(Point3f pos,
Color4f color,
int stripFlag,
int meshFlag)
Deprecated. Copy vertex data and add it to the end of this stream. |
(package private) void |
addVertex(Point3f pos,
int stripFlag)
Deprecated. Copy vertex data and add it to the end of this stream. |
(package private) void |
addVertex(Point3f pos,
int stripFlag,
int meshFlag)
Deprecated. Copy vertex data and add it to the end of this stream. |
(package private) void |
addVertex(Point3f pos,
Vector3f norm,
Color3f color,
int stripFlag)
Deprecated. Copy vertex data and add it to the end of this stream. |
(package private) void |
addVertex(Point3f pos,
Vector3f norm,
Color3f color,
int stripFlag,
int meshFlag)
Deprecated. Copy vertex data and add it to the end of this stream. |
(package private) void |
addVertex(Point3f pos,
Vector3f norm,
Color4f color,
int stripFlag)
Deprecated. Copy vertex data and add it to the end of this stream. |
(package private) void |
addVertex(Point3f pos,
Vector3f norm,
Color4f color,
int stripFlag,
int meshFlag)
Deprecated. Copy vertex data and add it to the end of this stream. |
(package private) void |
addVertex(Point3f pos,
Vector3f norm,
int stripFlag)
Deprecated. Copy vertex data and add it to the end of this stream. |
(package private) void |
addVertex(Point3f pos,
Vector3f norm,
int stripFlag,
int meshFlag)
Deprecated. Copy vertex data and add it to the end of this stream. |
(package private) void |
addVertex(Point3f pos,
Vector3f norm,
java.lang.Object color,
int stripFlag,
int meshFlag)
Deprecated. Copy vertex data and add it to the end of this stream. |
(package private) int |
getByteCount()
Deprecated. Retrieve the total size of the uncompressed geometric data in bytes, excluding mesh buffer references. |
private void |
getIndexArrays(GeometryArray ga,
CompressionStream.IndexArrays ia)
Deprecated. Retrieves index array references for the specified IndexedGeometryArray. |
(package private) int |
getMeshReferenceCount()
Deprecated. Retrieve the number of mesh buffer references created for this stream. |
Point3d[] |
getModelBounds()
Deprecated. Get the original bounds of the coordinate data, in modeling coordinates. |
Point3d[] |
getNormalizedBounds()
Deprecated. Get the bounds of the compressed object in normalized coordinates. |
private int |
getStreamType(GeometryArray ga)
Deprecated. |
private int |
getVertexComponents(int vertexFormat)
Deprecated. |
(package private) int |
getVertexCount()
Deprecated. Retrieve the the number of vertices created for this stream, excluding mesh buffer references. |
private void |
getVertexIndices(int v,
CompressionStream.IndexArrays ia,
CompressionStream.VertexIndices vi)
Deprecated. Retrieves vertex indices for a specific vertex in an IndexedGeometryArray. |
(package private) void |
outputCommands(HuffmanTable huffmanTable,
CommandStream outputBuffer)
Deprecated. Iterates across all compression stream elements and builds the compressed geometry command stream output. |
(package private) void |
print()
Deprecated. Print the stream to standard output. |
private void |
processIndexedVertexCopy(CompressionStream.VertexCopy vc,
CompressionStream.VertexIndices vi,
int stripFlag)
Deprecated. |
private void |
processVertexCopy(CompressionStream.VertexCopy vc,
int stripFlag)
Deprecated. |
(package private) void |
quantize(HuffmanTable huffmanTable)
Deprecated. Iterates across all compression stream elements and applies quantization parameters, encoding consecutive vertices as delta values whenever possible. |
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 noMeshNormalSubstitution
static final int RESTART
static final int REPLACE_MIDDLE
static final int REPLACE_OLDEST
static final int MESH_PUSH
static final int NO_MESH_PUSH
static final float ByteToFloatScale
int streamType
int vertexComponents
boolean vertexColors
boolean vertexColor3
boolean vertexColor4
boolean vertexNormals
boolean vertexTextures
boolean vertexTexture2
boolean vertexTexture3
boolean vertexTexture4
Point3d[] mcBounds
Point3d[] ncBounds
Point3i[] qcBounds
double[] center
double positionRangeMaximum
double scale
int positionQuant
At 1 bit of quantization it is not possible to express positive absolute or delta positions.
int colorQuant
A color component is represented with a signed fixed-point value in order to be able express negative deltas; the default of 9 bits corresponds to the 8-bit color component range of the graphics hardware commonly available. Colors must be non-negative, so the lower limit of quantization is 2 bits.
int normalQuant
At 0 bits of quantization normals are represented only as 6 bit sextant/octant pairs and 14 specially encoded normals (the 6 axis normals and the 8 octant midpoint normals); since U and V can only be 0 at the minimum quantization, the totally number of unique normals is 12 + 14 = 26.
boolean positionQuantChanged
boolean colorQuantChanged
boolean normalQuantChanged
int[] lastPosition
int[] lastColor
int lastSextant
int lastOctant
int lastU
int lastV
boolean lastSpecialNormal
boolean firstPosition
boolean firstColor
boolean firstNormal
int byteCount
int vertexCount
int meshReferenceCount
MeshBuffer meshBuffer
private java.util.Collection stream
private boolean lastElementColor
private boolean lastLastElementColor
private boolean lastElementNormal
private boolean lastLastElementNormal
private Point3f p3f
private Color3f c3f
private Color4f c4f
private Vector3f n3f
Constructor Detail |
---|
private CompressionStream()
CompressionStream(int streamType, int vertexComponents)
streamType
- type of data in this stream, either
CompressedGeometryHeader.POINT_BUFFER,
CompressedGeometryHeader.LINE_BUFFER, or
CompressedGeometryHeader.TRIANGLE_BUFFERvertexComponents
- a mask indicating which components are present
in each vertex, as defined by GeometryArray: COORDINATES, NORMALS, and
COLOR_3 or COLOR_4.GeometryCompressor
,
GeometryArray
public CompressionStream(int positionQuant, int colorQuant, int normalQuant, Shape3D[] shapes)
Each Shape3D in the array must be of the same dimensionality (point, line, or surface) and have the same vertex format as the others. Texture coordinates are ignored.
If a color is specified in the material attributes for a Shape3D then that color is added to the CompressionStream as the current global color. Subsequent colors as well as any colors bundled with vertices will override it. Only the material diffuse colors are used; all other appearance attributes are ignored.
positionQuant
- number of bits to quantize each position's X, Y,
and Z components, ranging from 1 to 16colorQuant
- number of bits to quantize each color's R, G, B, and
alpha components, ranging from 2 to 16normalQuant
- number of bits for quantizing each normal's U and V components, ranging
from 0 to 6shapes
- an array of Shape3D scene graph objects containing
GeometryArray objects, all with the same vertex format and
dimensionality
java.lang.IllegalArgumentException
- if any Shape3D has an inconsistent
dimensionality or vertex format, or if any Shape3D contains a geometry
component that is not a GeometryArrayShape3D
,
GeometryArray
,
GeometryCompressor
public CompressionStream(Shape3D[] shapes)
Each Shape3D in the array must be of the same dimensionality (point, line, or surface) and have the same vertex format as the others. Texture coordinates are ignored.
If a color is specified in the material attributes for a Shape3D then that color is added to the CompressionStream as the current global color. Subsequent colors as well as any colors bundled with vertices will override it. Only the material diffuse colors are used; all other appearance attributes are ignored.
Defaults of 16, 9, and 6 bits are used as the quantization values for positions, colors, and normals respectively. These are the maximum resolution values defined for positions and normals; the default of 9 for color is the equivalent of the 8 bits of RGBA component resolution commonly available in graphics frame buffers.
shapes
- an array of Shape3D scene graph objects containing
GeometryArray objects, all with the same vertex format and
dimensionality.
java.lang.IllegalArgumentException
- if any Shape3D has an inconsistent
dimensionality or vertex format, or if any Shape3D contains a geometry
component that is not a GeometryArrayShape3D
,
GeometryArray
,
GeometryCompressor
public CompressionStream(int positionQuant, int colorQuant, int normalQuant, GeometryInfo[] geometry)
Each GeometryInfo in the array must be of the same dimensionality (point, line, or surface) and have the same vertex format as the others. Texture coordinates are ignored.
positionQuant
- number of bits to quantize each position's X, Y,
and Z components, ranging from 1 to 16colorQuant
- number of bits to quantize each color's R, G, B, and
alpha components, ranging from 2 to 16normalQuant
- number of bits for quantizing each normal's U and V components, ranging
from 0 to 6geometry
- an array of GeometryInfo objects, all with the same
vertex format and dimensionality
java.lang.IllegalArgumentException
- if any GeometryInfo object has an
inconsistent dimensionality or vertex formatGeometryInfo
,
GeometryCompressor
public CompressionStream(GeometryInfo[] geometry)
Each GeometryInfo in the array must be of the same dimensionality (point, line, or surface) and have the same vertex format as the others. Texture coordinates are ignored.
Defaults of 16, 9, and 6 bits are used as the quantization values for positions, colors, and normals respectively. These are the maximum resolution values defined for positions and normals; the default of 9 for color is the equivalent of the 8 bits of RGBA component resolution commonly available in graphics frame buffers.
geometry
- an array of GeometryInfo objects, all with the same
vertex format and dimensionality
java.lang.IllegalArgumentException
- if any GeometryInfo object has an
inconsistent dimensionality or vertex formatGeometryInfo
,
GeometryCompressor
Method Detail |
---|
private int getVertexComponents(int vertexFormat)
private int getStreamType(GeometryArray ga)
void quantize(HuffmanTable huffmanTable)
Positions are normalized to span a unit cube via an offset and a uniform scale factor that maps the midpoint of the object extents along each dimension to the origin, and the longest dimension of the object to the open interval (-1.0 .. +1.0). The geometric endpoints along that dimension are both one quantum away from unity; for example, at a position quantization of 6 bits, an object would be normalized so that its most negative dimension is at (-1 + 1/64) and the most positive is at (1 - 1/64).
Normals are assumed to be of unit length. Color components are clamped to the [0..1) range, where the right endpoint is one quantum less than 1.0.
huffmanTable
- Table which will map geometric compression stream
elements to HuffmanNode objects describing each element's data
representation. This table can then be processed with Huffman's
algorithm to optimize the bit length of descriptor tags according to
the number of geometric elements mapped to each tag.void outputCommands(HuffmanTable huffmanTable, CommandStream outputBuffer)
huffmanTable
- Table which maps geometric elements in this stream
to tags describing the encoding parameters (length, shift, and
absolute/relative status) to be used for their representations in the
compressed output. All tags must be 6 bits or less in length, and the
sum of the number of bits in the tag plus the number of bits in the
data it describes must be at least 6 bits in length.outputBuffer
- CommandStream to use for collecting the compressed
bits.int getByteCount()
int getVertexCount()
int getMeshReferenceCount()
void addVertex(Point3f pos, int stripFlag)
pos
- position datastripFlag
- vertex replacement flag, either RESTART,
REPLACE_OLDEST, or REPLACE_MIDDLEvoid addVertex(Point3f pos, Vector3f norm, int stripFlag)
pos
- position datanorm
- normal datastripFlag
- vertex replacement flag, either RESTART,
REPLACE_OLDEST, or REPLACE_MIDDLEvoid addVertex(Point3f pos, Color3f color, int stripFlag)
pos
- position datacolor
- color datastripFlag
- vertex replacement flag, either RESTART,
REPLACE_OLDEST, or REPLACE_MIDDLEvoid addVertex(Point3f pos, Color4f color, int stripFlag)
pos
- position datacolor
- color datastripFlag
- vertex replacement flag, either RESTART,
REPLACE_OLDEST, or REPLACE_MIDDLEvoid addVertex(Point3f pos, Vector3f norm, Color3f color, int stripFlag)
pos
- position datanorm
- normal datacolor
- color datastripFlag
- vertex replacement flag, either RESTART,
REPLACE_OLDEST, or REPLACE_MIDDLEvoid addVertex(Point3f pos, Vector3f norm, Color4f color, int stripFlag)
pos
- position datanorm
- normal datacolor
- color datastripFlag
- vertex replacement flag, either RESTART,
REPLACE_OLDEST, or REPLACE_MIDDLEvoid addVertex(Point3f pos, int stripFlag, int meshFlag)
pos
- position datastripFlag
- vertex replacement flag, either RESTART, REPLACE_OLDEST,
or REPLACE_MIDDLEmeshFlag
- if MESH_PUSH the vertex is pushed into the mesh buffervoid addVertex(Point3f pos, Vector3f norm, int stripFlag, int meshFlag)
pos
- position datanorm
- normal datastripFlag
- vertex replacement flag, either RESTART, REPLACE_OLDEST,
or REPLACE_MIDDLEmeshFlag
- if MESH_PUSH the vertex is pushed into the mesh buffervoid addVertex(Point3f pos, Color3f color, int stripFlag, int meshFlag)
pos
- position datacolor
- color datastripFlag
- vertex replacement flag, either RESTART, REPLACE_OLDEST,
or REPLACE_MIDDLEmeshFlag
- if MESH_PUSH the vertex is pushed into the mesh buffervoid addVertex(Point3f pos, Color4f color, int stripFlag, int meshFlag)
pos
- position datacolor
- color datastripFlag
- vertex replacement flag, either RESTART, REPLACE_OLDEST,
or REPLACE_MIDDLEmeshFlag
- if MESH_PUSH the vertex is pushed into the mesh buffervoid addVertex(Point3f pos, Vector3f norm, Color3f color, int stripFlag, int meshFlag)
pos
- position datanorm
- normal datacolor
- color datastripFlag
- vertex replacement flag, either RESTART, REPLACE_OLDEST,
or REPLACE_MIDDLEmeshFlag
- if MESH_PUSH the vertex is pushed into the mesh buffervoid addVertex(Point3f pos, Vector3f norm, Color4f color, int stripFlag, int meshFlag)
pos
- position datanorm
- normal datacolor
- color datastripFlag
- vertex replacement flag, either RESTART, REPLACE_OLDEST,
or REPLACE_MIDDLEmeshFlag
- if MESH_PUSH the vertex is pushed into the mesh buffervoid addVertex(Point3f pos, Vector3f norm, java.lang.Object color, int stripFlag, int meshFlag)
pos
- position datanorm
- normal datacolor
- color data, either Color3f or Color4f, determined by
current vertex formatstripFlag
- vertex replacement flag, either RESTART, REPLACE_OLDEST,
or REPLACE_MIDDLEmeshFlag
- if MESH_PUSH the vertex is pushed into the mesh buffervoid addMeshReference(int stripFlag, int meshIndex)
stripFlag
- vertex replacement flag, either RESTART, REPLACE_OLDEST,
or REPLACE_MIDDLEmeshIndex
- index of vertex to retrieve from the mesh buffervoid addColor(Color3f c3f)
void addColor(Color4f c4f)
void addNormal(Vector3f n)
void addPositionQuantization(int value)
value
- number of bits to quantize each position's X, Y,
and Z components, ranging from 1 to 16 with a default of 16void addColorQuantization(int value)
value
- number of bits to quantize each color's R, G, B, and
alpha components, ranging from 2 to 16 with a default of 9void addNormalQuantization(int value)
value
- number of bits for quantizing U and V, ranging from 0 to
6 with a default of 6private void getIndexArrays(GeometryArray ga, CompressionStream.IndexArrays ia)
private void getVertexIndices(int v, CompressionStream.IndexArrays ia, CompressionStream.VertexIndices vi)
private void processVertexCopy(CompressionStream.VertexCopy vc, int stripFlag)
private void processIndexedVertexCopy(CompressionStream.VertexCopy vc, CompressionStream.VertexIndices vi, int stripFlag)
void addGeometryArray(GeometryArray ga)
ga
- GeometryArray to convert
java.lang.IllegalArgumentException
- if GeometryArray has a
dimensionality or vertex format inconsistent with the CompressionStreamvoid print()
public Point3d[] getModelBounds()
public Point3d[] getNormalizedBounds()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |