|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.j3d.utils.geometry.compression.CompressionStreamElement
com.sun.j3d.utils.geometry.compression.CompressionStreamColor
class CompressionStreamColor
This class represents a color in a compression stream. It maintains both floating-point and quantized representations. This color may be bundled with a vertex or exist separately as a global color.
Field Summary | |
---|---|
private int |
A
|
(package private) int |
aAbsolute
|
private int |
B
|
(package private) int |
bAbsolute
|
private boolean |
color3
|
private boolean |
color4
|
private float |
colorA
|
private float |
colorB
|
private float |
colorG
|
private float |
colorR
|
private int |
G
|
(package private) int |
gAbsolute
|
private int |
R
|
(package private) int |
rAbsolute
|
Fields inherited from class com.sun.j3d.utils.geometry.compression.CompressionStreamElement |
---|
absolute, length, lengthMask, quantizationMask, shift |
Constructor Summary | |
---|---|
CompressionStreamColor(CompressionStream stream,
Color3f c3)
Create a CompressionStreamColor. |
|
CompressionStreamColor(CompressionStream stream,
Color4f c4)
Create a CompressionStreamColor. |
Method Summary | |
---|---|
private void |
outputColor(HuffmanTable table,
CommandStream output,
int header,
int headerLength)
|
(package private) void |
outputCommand(HuffmanTable table,
CommandStream output)
Output a setColor command. |
(package private) void |
outputSubcommand(HuffmanTable table,
CommandStream output)
Output a color subcommand. |
(package private) void |
quantize(CompressionStream stream,
HuffmanTable huffmanTable)
Quantize a floating point color to fixed point integer components of the specified number of bits. |
java.lang.String |
toString()
|
Methods inherited from class com.sun.j3d.utils.geometry.compression.CompressionStreamElement |
---|
computeLengthShift, computeLengthShift, computeLengthShift |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private int R
private int G
private int B
private int A
private boolean color3
private boolean color4
private float colorR
private float colorG
private float colorB
private float colorA
int rAbsolute
int gAbsolute
int bAbsolute
int aAbsolute
Constructor Detail |
---|
CompressionStreamColor(CompressionStream stream, Color3f c3)
stream
- CompressionStream associated with this elementcolor3
- floating-point representation to be encodedCompressionStreamColor(CompressionStream stream, Color4f c4)
stream
- CompressionStream associated with this elementcolor4
- floating-point representation to be encodedMethod Detail |
---|
void quantize(CompressionStream stream, HuffmanTable huffmanTable)
The bit length is the total number of bits in the signed version of the fixed point representation of the input color, which is assumed to be normalized into the [0..1) range. With the maximum bit length of 16, 15 bits of positive colors can be represented; a bit length of 9 is needed to get the 8 bit positive color size in common use.
quantize
in class CompressionStreamElement
stream
- CompressionStream associated with this elementtable
- HuffmanTable for collecting data about the quantized
representation of this elementvoid outputCommand(HuffmanTable table, CommandStream output)
outputCommand
in class CompressionStreamElement
table
- HuffmanTable mapping quantized representations to
compressed encodingsoutput
- CommandStream for collecting compressed outputvoid outputSubcommand(HuffmanTable table, CommandStream output)
table
- HuffmanTable mapping quantized representations to
compressed encodingsoutput
- CommandStream for collecting compressed outputprivate void outputColor(HuffmanTable table, CommandStream output, int header, int headerLength)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |