|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.j3d.utils.compression.CompressionStreamElement
abstract class CompressionStreamElement
Instances of this class are used as elements in a CompressionStream.
CompressionStream
Field Summary | |
---|---|
(package private) boolean |
absolute
If false, geometric component values are represented as differences from those of the preceding element in the stream. |
(package private) int |
length
Bit length of quantized geometric components. |
(package private) static long[] |
lengthMask
Array with elements that can be used as masks to retain the number of trailing bits of data indicated by the referencing index [0..64]. |
(package private) static int[] |
quantizationMask
Array with elements that can be used as masks to apply a quantization to the number of bits indicated by the referencing index [0..16]. |
(package private) int |
shift
Number of trailing zeros in quantized geometric components. |
Constructor Summary | |
---|---|
CompressionStreamElement()
|
Method Summary | |
---|---|
(package private) void |
computeLengthShift(int n0,
int n1)
Computes common length and shift of 2 numbers. |
(package private) void |
computeLengthShift(int n0,
int n1,
int n2)
Computes common length and shift of 3 numbers. |
(package private) void |
computeLengthShift(int n0,
int n1,
int n2,
int n3)
Computes common length and shift of 4 numbers. |
private static int |
getLength(int number)
Finds the minimum bits needed to represent the given 16-bit signed 2's complement integer. |
private static int |
getMaximum(int x,
int y)
Finds the maximum of two integers. |
private static int |
getMaximum(int x,
int y,
int z)
Finds the maximum of three integers. |
private static int |
getMaximum(int x,
int y,
int z,
int w)
Finds the maximum of four integers. |
private static int |
getShift(int number)
Finds the rightmost 1 bit in the given 16-bit integer. |
(package private) void |
outputCommand(HuffmanTable table,
CommandStream output)
Outputs the compressed bits representing this stream element. |
(package private) abstract void |
quantize(CompressionStream stream,
HuffmanTable table)
Computes the quantized representation of this stream element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
int length
int shift
boolean absolute
static final int[] quantizationMask
static final long[] lengthMask
Constructor Detail |
---|
CompressionStreamElement()
Method Detail |
---|
abstract void quantize(CompressionStream stream, HuffmanTable table)
stream
- CompressionStream associated with this elementtable
- HuffmanTable for collecting data about the quantized
representation of this elementvoid outputCommand(HuffmanTable table, CommandStream output)
table
- HuffmanTable mapping quantized representations to
compressed encodingsoutput
- CommandStream for collecting compressed outputprivate static final int getLength(int number)
number
- a signed 2's complement integer representable in 16 bits
or less
private static final int getShift(int number)
number
- an integer representable in 16 bits or less
final void computeLengthShift(int n0, int n1)
final void computeLengthShift(int n0, int n1, int n2)
final void computeLengthShift(int n0, int n1, int n2, int n3)
private static final int getMaximum(int x, int y)
private static final int getMaximum(int x, int y, int z)
private static final int getMaximum(int x, int y, int z, int w)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |