com.sun.j3d.utils.geometry.compression
Class CompressionStreamNormal
java.lang.Object
com.sun.j3d.utils.geometry.compression.CompressionStreamElement
com.sun.j3d.utils.geometry.compression.CompressionStreamNormal
class CompressionStreamNormal
- extends CompressionStreamElement
This class represents a normal in a compression stream. It maintains both
floating-point and quantized representations. This normal may be bundled
with a vertex or exist separately as a global normal.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
u
private int u
v
private int v
specialOctant
private int specialOctant
specialSextant
private int specialSextant
normalX
private float normalX
normalY
private float normalY
normalZ
private float normalZ
octant
int octant
sextant
int sextant
specialNormal
boolean specialNormal
uAbsolute
int uAbsolute
vAbsolute
int vAbsolute
MAX_UV_BITS
private static final int MAX_UV_BITS
- See Also:
- Constant Field Values
MAX_UV_ENTRIES
private static final int MAX_UV_ENTRIES
- See Also:
- Constant Field Values
cgNormals
private static final double[][][][] cgNormals
MAX_Y_ANG
private static final double MAX_Y_ANG
- See Also:
- Constant Field Values
UNITY_14
private static final double UNITY_14
- See Also:
- Constant Field Values
inverseSine
private static final short[][] inverseSine
MAX_SIN_14BIT
private static final short MAX_SIN_14BIT
- See Also:
- Constant Field Values
CompressionStreamNormal
CompressionStreamNormal(CompressionStream stream,
Vector3f normal)
- Create a CompressionStreamNormal.
- Parameters:
stream
- CompressionStream associated with this elementnormal
- floating-point representation to be encoded
computeNormals
private static void computeNormals()
computeInverseSineTables
private static void computeInverseSineTables()
quantize
void quantize(CompressionStream stream,
HuffmanTable huffmanTable)
- Quantize the floating point normal to a 6-bit octant/sextant plus u,v
components of [0..6] bits. Full resolution is 18 bits and the minimum
is 6 bits.
- Specified by:
quantize
in class CompressionStreamElement
- Parameters:
stream
- CompressionStream associated with this elementtable
- HuffmanTable for collecting data about the quantized
representation of this element
outputCommand
void outputCommand(HuffmanTable table,
CommandStream output)
- Output a setNormal command.
- Overrides:
outputCommand
in class CompressionStreamElement
- Parameters:
table
- HuffmanTable mapping quantized representations to
compressed encodingsoutput
- CommandStream for collecting compressed output
outputSubcommand
void outputSubcommand(HuffmanTable table,
CommandStream output)
- Output a normal subcommand.
- Parameters:
table
- HuffmanTable mapping quantized representations to
compressed encodingsoutput
- CommandStream for collecting compressed output
outputNormal
private void outputNormal(HuffmanTable table,
CommandStream output,
int header,
int headerLength)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.