Java Doc for CompressionStream.java in  » 6.0-JDK-Modules » java-3d » com » sun » j3d » utils » compression » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » java 3d » com.sun.j3d.utils.compression 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.j3d.utils.compression.CompressionStream

CompressionStream
public class CompressionStream (Code)
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.
See Also:   GeometryCompressorcom.sun.j3d.utils.geometry.compression.CompressionStream


Field Summary
final static  floatByteToFloatScale
     Byte to float scale factor for scaling byte color components.
final static  intMESH_PUSH
     This flag indicates that a vertex is to be pushed into the mesh buffer.
final static  intNO_MESH_PUSH
     This flag indicates that a vertex does not use the mesh buffer.
final static  intREPLACE_MIDDLE
     This flag indicates that the next triangle in the strip is defined by replacing the middle vertex of the previous triangle in the strip.
final static  intREPLACE_OLDEST
     This flag indicates that the next triangle in the strip is defined by replacing the oldest vertex of the previous triangle in the strip.
final static  intRESTART
     This flag indicates that a vertex starts a new triangle or line strip.
 intbyteCount
     The total number of bytes used to create the uncompressed geometric elements in this stream, useful for performance analysis.
 doublecenter
     Center for normalizing positions to the unit cube.
 intcolorQuant
     Current color component (R, G, B, A) quantization value.
 booleancolorQuantChanged
     Flag indicating color quantization change.
 booleanfirstColor
     Flag indicating the first color in this stream.
 booleanfirstNormal
     Flag indicating the first normal in this stream.
 booleanfirstPosition
     Flag indicating the first position in this stream.
 intlastColor
     Last quantized color.
 intlastOctant
     Last quantized normal's octant.
 intlastPosition
     Last quantized position.
 intlastSextant
     Last quantized normal's sextant.
 booleanlastSpecialNormal
     Flag indicating last normal used a special encoding.
 intlastU
     Last quantized normal's U encoding parameter.
 intlastV
     Last quantized normal's V encoding parameter.
 Point3dmcBounds
     Axes-aligned box enclosing all vertices in model coordinates.
 MeshBuffermeshBuffer
     Mesh buffer mirror used for computing deltas during quantization pass and a limited meshing algorithm for unstripped data.
 intmeshReferenceCount
     The number of mesh buffer references created for this stream.
 Point3dncBounds
     Axes-aligned box enclosing all vertices in normalized coordinates.
 intnormalQuant
     Current normal component (U and V) quantization value.
 booleannormalQuantChanged
     Flag indicating normal quantization change.
 intpositionQuant
     Current position component (X, Y, and Z) quantization value.
 booleanpositionQuantChanged
     Flag indicating position quantization change.
 doublepositionRangeMaximum
     Maximum position range along the 3 axes.
 Point3iqcBounds
     Axes-aligned box enclosing all vertices in quantized coordinates.
 doublescale
     Scale for normalizing positions to the unit cube.
 intstreamType
    
 booleanvertexColor3
     Boolean indicating RGB colors are bundled with the vertices.
 booleanvertexColor4
     Boolean indicating RGBA colors are bundled with the vertices.
 booleanvertexColors
     Boolean indicating colors are bundled with the vertices.
 intvertexComponents
     A mask indicating which components are present in each vertex, as defined by GeometryArray.
 intvertexCount
     The number of vertices created for this stream, excluding mesh buffer references.
 booleanvertexNormals
     Boolean indicating normals are bundled with the vertices.
 booleanvertexTexture2
     Boolean indicating that 2D texture coordinates are used.
 booleanvertexTexture3
     Boolean indicating that 3D texture coordinates are used.
 booleanvertexTexture4
     Boolean indicating that 4D texture coordinates are used.
 booleanvertexTextures
     Boolean indicating texture coordinates are present.

Constructor Summary
 CompressionStream(int streamType, int vertexComponents)
    
public  CompressionStream(int positionQuant, int colorQuant, int normalQuant, Shape3D shapes)
     Creates a CompressionStream from an array of Shape3D scene graph objects.
public  CompressionStream(Shape3D shapes)
     Creates a CompressionStream from an array of Shape3D scene graph objects.
public  CompressionStream(int positionQuant, int colorQuant, int normalQuant, GeometryInfo geometry)
     Creates a CompressionStream from an array of GeometryInfo objects.
public  CompressionStream(GeometryInfo geometry)
     Creates a CompressionStream from an array of GeometryInfo objects.

Method Summary
 voidaddColor(Color3f c3f)
     Copy the given color to the end of this stream and use it as a global state change that applies to all subsequent vertices.
 voidaddColor(Color4f c4f)
     Copy the given color to the end of this stream and use it as a global state change that applies to all subsequent vertices.
 voidaddColorQuantization(int value)
     Add a new color quantization value to the end of this stream that will apply to all subsequent colors.
 voidaddGeometryArray(GeometryArray ga)
     Convert a GeometryArray to compression stream elements and add them to this stream.
 voidaddMeshReference(int stripFlag, int meshIndex)
     Add a mesh buffer reference to this stream.
 voidaddNormal(Vector3f n)
     Copy the given normal to the end of this stream and use it as a global state change that applies to all subsequent vertices.
 voidaddNormalQuantization(int value)
     Add a new normal quantization value to the end of this stream that will apply to all subsequent normals.
 voidaddPositionQuantization(int value)
     Add a new position quantization value to the end of this stream that will apply to all subsequent vertex positions.
 voidaddVertex(Point3f pos, int stripFlag)
     Copy vertex data and add it to the end of this stream.
 voidaddVertex(Point3f pos, Vector3f norm, int stripFlag)
     Copy vertex data and add it to the end of this stream.
 voidaddVertex(Point3f pos, Color3f color, int stripFlag)
     Copy vertex data and add it to the end of this stream.
 voidaddVertex(Point3f pos, Color4f color, int stripFlag)
     Copy vertex data and add it to the end of this stream.
 voidaddVertex(Point3f pos, Vector3f norm, Color3f color, int stripFlag)
     Copy vertex data and add it to the end of this stream.
 voidaddVertex(Point3f pos, Vector3f norm, Color4f color, int stripFlag)
     Copy vertex data and add it to the end of this stream.
 voidaddVertex(Point3f pos, int stripFlag, int meshFlag)
     Copy vertex data and add it to the end of this stream.
 voidaddVertex(Point3f pos, Vector3f norm, int stripFlag, int meshFlag)
     Copy vertex data and add it to the end of this stream.
 voidaddVertex(Point3f pos, Color3f color, int stripFlag, int meshFlag)
     Copy vertex data and add it to the end of this stream.
 voidaddVertex(Point3f pos, Color4f color, int stripFlag, int meshFlag)
     Copy vertex data and add it to the end of this stream.
 voidaddVertex(Point3f pos, Vector3f norm, Color3f color, int stripFlag, int meshFlag)
     Copy vertex data and add it to the end of this stream.
 voidaddVertex(Point3f pos, Vector3f norm, Color4f color, int stripFlag, int meshFlag)
     Copy vertex data and add it to the end of this stream.
 voidaddVertex(Point3f pos, Vector3f norm, Object color, int stripFlag, int meshFlag)
     Copy vertex data and add it to the end of this stream.
 intgetByteCount()
     Retrieve the total size of the uncompressed geometric data in bytes, excluding mesh buffer references.
 intgetMeshReferenceCount()
     Retrieve the number of mesh buffer references created for this stream.
public  Point3d[]getModelBounds()
     Get the original bounds of the coordinate data, in modeling coordinates. Coordinate data is positioned and scaled to a normalized cube after compression.
public  Point3d[]getNormalizedBounds()
     Get the bounds of the compressed object in normalized coordinates. These have an maximum bounds by [-1.0 ..
 intgetVertexCount()
     Retrieve the the number of vertices created for this stream, excluding mesh buffer references.
 voidoutputCommands(HuffmanTable huffmanTable, CommandStream outputBuffer)
     Iterates across all compression stream elements and builds the compressed geometry command stream output.


Parameters:
  huffmanTable - Table which maps geometric elements in this streamto tags describing the encoding parameters (length, shift, andabsolute/relative status) to be used for their representations in thecompressed output.

 voidprint()
     Print the stream to standard output.
 voidquantize(HuffmanTable huffmanTable)
     Iterates across all compression stream elements and applies quantization parameters, encoding consecutive vertices as delta values whenever possible.

Field Detail
ByteToFloatScale
final static float ByteToFloatScale(Code)
Byte to float scale factor for scaling byte color components.



MESH_PUSH
final static int MESH_PUSH(Code)
This flag indicates that a vertex is to be pushed into the mesh buffer.



NO_MESH_PUSH
final static int NO_MESH_PUSH(Code)
This flag indicates that a vertex does not use the mesh buffer.



REPLACE_MIDDLE
final static int REPLACE_MIDDLE(Code)
This flag indicates that the next triangle in the strip is defined by replacing the middle vertex of the previous triangle in the strip. Equivalent to REPLACE_OLDEST for line strips.



REPLACE_OLDEST
final static int REPLACE_OLDEST(Code)
This flag indicates that the next triangle in the strip is defined by replacing the oldest vertex of the previous triangle in the strip. Equivalent to REPLACE_MIDDLE for line strips.



RESTART
final static int RESTART(Code)
This flag indicates that a vertex starts a new triangle or line strip.



byteCount
int byteCount(Code)
The total number of bytes used to create the uncompressed geometric elements in this stream, useful for performance analysis. This excludes mesh buffer references.



center
double center(Code)
Center for normalizing positions to the unit cube.



colorQuant
int colorQuant(Code)
Current color component (R, G, B, A) quantization value. This can range from 2 to 16 bits and has a default of 9.

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.




colorQuantChanged
boolean colorQuantChanged(Code)
Flag indicating color quantization change.



firstColor
boolean firstColor(Code)
Flag indicating the first color in this stream.



firstNormal
boolean firstNormal(Code)
Flag indicating the first normal in this stream.



firstPosition
boolean firstPosition(Code)
Flag indicating the first position in this stream.



lastColor
int lastColor(Code)
Last quantized color.



lastOctant
int lastOctant(Code)
Last quantized normal's octant.



lastPosition
int lastPosition(Code)
Last quantized position.



lastSextant
int lastSextant(Code)
Last quantized normal's sextant.



lastSpecialNormal
boolean lastSpecialNormal(Code)
Flag indicating last normal used a special encoding.



lastU
int lastU(Code)
Last quantized normal's U encoding parameter.



lastV
int lastV(Code)
Last quantized normal's V encoding parameter.



mcBounds
Point3d mcBounds(Code)
Axes-aligned box enclosing all vertices in model coordinates.



meshBuffer
MeshBuffer meshBuffer(Code)
Mesh buffer mirror used for computing deltas during quantization pass and a limited meshing algorithm for unstripped data.



meshReferenceCount
int meshReferenceCount(Code)
The number of mesh buffer references created for this stream.



ncBounds
Point3d ncBounds(Code)
Axes-aligned box enclosing all vertices in normalized coordinates.



normalQuant
int normalQuant(Code)
Current normal component (U and V) quantization value. This can range from 0 to 6 bits and has a default of 6.

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.




normalQuantChanged
boolean normalQuantChanged(Code)
Flag indicating normal quantization change.



positionQuant
int positionQuant(Code)
Current position component (X, Y, and Z) quantization value. This can range from 1 to 16 bits and has a default of 16.

At 1 bit of quantization it is not possible to express positive absolute or delta positions.




positionQuantChanged
boolean positionQuantChanged(Code)
Flag indicating position quantization change.



positionRangeMaximum
double positionRangeMaximum(Code)
Maximum position range along the 3 axes.



qcBounds
Point3i qcBounds(Code)
Axes-aligned box enclosing all vertices in quantized coordinates.



scale
double scale(Code)
Scale for normalizing positions to the unit cube.



streamType
int streamType(Code)
Type of this stream, either CompressedGeometryHeader.POINT_BUFFER, CompressedGeometryHeader.LINE_BUFFER, or CompressedGeometryHeader.TRIANGLE_BUFFER



vertexColor3
boolean vertexColor3(Code)
Boolean indicating RGB colors are bundled with the vertices.



vertexColor4
boolean vertexColor4(Code)
Boolean indicating RGBA colors are bundled with the vertices.



vertexColors
boolean vertexColors(Code)
Boolean indicating colors are bundled with the vertices.



vertexComponents
int vertexComponents(Code)
A mask indicating which components are present in each vertex, as defined by GeometryArray.



vertexCount
int vertexCount(Code)
The number of vertices created for this stream, excluding mesh buffer references.



vertexNormals
boolean vertexNormals(Code)
Boolean indicating normals are bundled with the vertices.



vertexTexture2
boolean vertexTexture2(Code)
Boolean indicating that 2D texture coordinates are used. Currently only used to skip over textures in interleaved data.



vertexTexture3
boolean vertexTexture3(Code)
Boolean indicating that 3D texture coordinates are used. Currently only used to skip over textures in interleaved data.



vertexTexture4
boolean vertexTexture4(Code)
Boolean indicating that 4D texture coordinates are used. Currently only used to skip over textures in interleaved data.



vertexTextures
boolean vertexTextures(Code)
Boolean indicating texture coordinates are present.




Constructor Detail
CompressionStream
CompressionStream(int streamType, int vertexComponents)(Code)
Creates a new CompressionStream for the specified geometry type and vertex format.


Parameters:
  streamType - type of data in this stream, eitherCompressedGeometryHeader.POINT_BUFFER,CompressedGeometryHeader.LINE_BUFFER, orCompressedGeometryHeader.TRIANGLE_BUFFER
Parameters:
  vertexComponents - a mask indicating which components are presentin each vertex, as defined by GeometryArray: COORDINATES, NORMALS, andCOLOR_3 or COLOR_4.
See Also:   GeometryCompressor
See Also:   GeometryArray




CompressionStream
public CompressionStream(int positionQuant, int colorQuant, int normalQuant, Shape3D shapes)(Code)
Creates a CompressionStream from an array of Shape3D scene graph objects. These Shape3D objects may only consist of a GeometryArray component and an optional Appearance component. The resulting stream may be used as input to the GeometryCompressor methods.

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.


Parameters:
  positionQuant - number of bits to quantize each position's X, Y,and Z components, ranging from 1 to 16
Parameters:
  colorQuant - number of bits to quantize each color's R, G, B, andalpha components, ranging from 2 to 16
Parameters:
  normalQuant - number of bits for quantizing each normal's U and V components, rangingfrom 0 to 6
Parameters:
  shapes - an array of Shape3D scene graph objects containingGeometryArray objects, all with the same vertex format anddimensionality
exception:
  IllegalArgumentException - if any Shape3D has an inconsistentdimensionality or vertex format, or if any Shape3D contains a geometrycomponent that is not a GeometryArray
See Also:   Shape3D
See Also:   GeometryArray
See Also:   GeometryCompressor




CompressionStream
public CompressionStream(Shape3D shapes)(Code)
Creates a CompressionStream from an array of Shape3D scene graph objects. These Shape3D objects may only consist of a GeometryArray component and an optional Appearance component. The resulting stream may be used as input to the GeometryCompressor methods.

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.


Parameters:
  shapes - an array of Shape3D scene graph objects containingGeometryArray objects, all with the same vertex format anddimensionality.
exception:
  IllegalArgumentException - if any Shape3D has an inconsistentdimensionality or vertex format, or if any Shape3D contains a geometrycomponent that is not a GeometryArray
See Also:   Shape3D
See Also:   GeometryArray
See Also:   GeometryCompressor




CompressionStream
public CompressionStream(int positionQuant, int colorQuant, int normalQuant, GeometryInfo geometry)(Code)
Creates a CompressionStream from an array of GeometryInfo objects. The resulting stream may be used as input to the GeometryCompressor methods.

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.


Parameters:
  positionQuant - number of bits to quantize each position's X, Y,and Z components, ranging from 1 to 16
Parameters:
  colorQuant - number of bits to quantize each color's R, G, B, andalpha components, ranging from 2 to 16
Parameters:
  normalQuant - number of bits for quantizing each normal's U and V components, rangingfrom 0 to 6
Parameters:
  geometry - an array of GeometryInfo objects, all with the samevertex format and dimensionality
exception:
  IllegalArgumentException - if any GeometryInfo object has aninconsistent dimensionality or vertex format
See Also:   GeometryInfo
See Also:   GeometryCompressor




CompressionStream
public CompressionStream(GeometryInfo geometry)(Code)
Creates a CompressionStream from an array of GeometryInfo objects. The resulting stream may be used as input to the GeometryCompressor methods.

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.


Parameters:
  geometry - an array of GeometryInfo objects, all with the samevertex format and dimensionality
exception:
  IllegalArgumentException - if any GeometryInfo object has aninconsistent dimensionality or vertex format
See Also:   GeometryInfo
See Also:   GeometryCompressor





Method Detail
addColor
void addColor(Color3f c3f)(Code)
Copy the given color to the end of this stream and use it as a global state change that applies to all subsequent vertices.



addColor
void addColor(Color4f c4f)(Code)
Copy the given color to the end of this stream and use it as a global state change that applies to all subsequent vertices.



addColorQuantization
void addColorQuantization(int value)(Code)
Add a new color quantization value to the end of this stream that will apply to all subsequent colors.
Parameters:
  value - number of bits to quantize each color's R, G, B, andalpha components, ranging from 2 to 16 with a default of 9



addGeometryArray
void addGeometryArray(GeometryArray ga)(Code)
Convert a GeometryArray to compression stream elements and add them to this stream.
Parameters:
  ga - GeometryArray to convert
exception:
  IllegalArgumentException - if GeometryArray has adimensionality or vertex format inconsistent with the CompressionStream



addMeshReference
void addMeshReference(int stripFlag, int meshIndex)(Code)
Add a mesh buffer reference to this stream.
Parameters:
  stripFlag - vertex replacement flag, either RESTART, REPLACE_OLDEST,or REPLACE_MIDDLE
Parameters:
  meshIndex - index of vertex to retrieve from the mesh buffer



addNormal
void addNormal(Vector3f n)(Code)
Copy the given normal to the end of this stream and use it as a global state change that applies to all subsequent vertices.



addNormalQuantization
void addNormalQuantization(int value)(Code)
Add a new normal quantization value to the end of this stream that will apply to all subsequent normals. This value specifies the number of bits for each normal's U and V components.
Parameters:
  value - number of bits for quantizing U and V, ranging from 0 to6 with a default of 6



addPositionQuantization
void addPositionQuantization(int value)(Code)
Add a new position quantization value to the end of this stream that will apply to all subsequent vertex positions.
Parameters:
  value - number of bits to quantize each position's X, Y,and Z components, ranging from 1 to 16 with a default of 16



addVertex
void addVertex(Point3f pos, int stripFlag)(Code)
Copy vertex data and add it to the end of this stream.
Parameters:
  pos - position data
Parameters:
  stripFlag - vertex replacement flag, either RESTART,REPLACE_OLDEST, or REPLACE_MIDDLE



addVertex
void addVertex(Point3f pos, Vector3f norm, int stripFlag)(Code)
Copy vertex data and add it to the end of this stream.
Parameters:
  pos - position data
Parameters:
  norm - normal data
Parameters:
  stripFlag - vertex replacement flag, either RESTART,REPLACE_OLDEST, or REPLACE_MIDDLE



addVertex
void addVertex(Point3f pos, Color3f color, int stripFlag)(Code)
Copy vertex data and add it to the end of this stream.
Parameters:
  pos - position data
Parameters:
  color - color data
Parameters:
  stripFlag - vertex replacement flag, either RESTART,REPLACE_OLDEST, or REPLACE_MIDDLE



addVertex
void addVertex(Point3f pos, Color4f color, int stripFlag)(Code)
Copy vertex data and add it to the end of this stream.
Parameters:
  pos - position data
Parameters:
  color - color data
Parameters:
  stripFlag - vertex replacement flag, either RESTART,REPLACE_OLDEST, or REPLACE_MIDDLE



addVertex
void addVertex(Point3f pos, Vector3f norm, Color3f color, int stripFlag)(Code)
Copy vertex data and add it to the end of this stream.
Parameters:
  pos - position data
Parameters:
  norm - normal data
Parameters:
  color - color data
Parameters:
  stripFlag - vertex replacement flag, either RESTART,REPLACE_OLDEST, or REPLACE_MIDDLE



addVertex
void addVertex(Point3f pos, Vector3f norm, Color4f color, int stripFlag)(Code)
Copy vertex data and add it to the end of this stream.
Parameters:
  pos - position data
Parameters:
  norm - normal data
Parameters:
  color - color data
Parameters:
  stripFlag - vertex replacement flag, either RESTART,REPLACE_OLDEST, or REPLACE_MIDDLE



addVertex
void addVertex(Point3f pos, int stripFlag, int meshFlag)(Code)
Copy vertex data and add it to the end of this stream.
Parameters:
  pos - position data
Parameters:
  stripFlag - vertex replacement flag, either RESTART, REPLACE_OLDEST,or REPLACE_MIDDLE
Parameters:
  meshFlag - if MESH_PUSH the vertex is pushed into the mesh buffer



addVertex
void addVertex(Point3f pos, Vector3f norm, int stripFlag, int meshFlag)(Code)
Copy vertex data and add it to the end of this stream.
Parameters:
  pos - position data
Parameters:
  norm - normal data
Parameters:
  stripFlag - vertex replacement flag, either RESTART, REPLACE_OLDEST,or REPLACE_MIDDLE
Parameters:
  meshFlag - if MESH_PUSH the vertex is pushed into the mesh buffer



addVertex
void addVertex(Point3f pos, Color3f color, int stripFlag, int meshFlag)(Code)
Copy vertex data and add it to the end of this stream.
Parameters:
  pos - position data
Parameters:
  color - color data
Parameters:
  stripFlag - vertex replacement flag, either RESTART, REPLACE_OLDEST,or REPLACE_MIDDLE
Parameters:
  meshFlag - if MESH_PUSH the vertex is pushed into the mesh buffer



addVertex
void addVertex(Point3f pos, Color4f color, int stripFlag, int meshFlag)(Code)
Copy vertex data and add it to the end of this stream.
Parameters:
  pos - position data
Parameters:
  color - color data
Parameters:
  stripFlag - vertex replacement flag, either RESTART, REPLACE_OLDEST,or REPLACE_MIDDLE
Parameters:
  meshFlag - if MESH_PUSH the vertex is pushed into the mesh buffer



addVertex
void addVertex(Point3f pos, Vector3f norm, Color3f color, int stripFlag, int meshFlag)(Code)
Copy vertex data and add it to the end of this stream.
Parameters:
  pos - position data
Parameters:
  norm - normal data
Parameters:
  color - color data
Parameters:
  stripFlag - vertex replacement flag, either RESTART, REPLACE_OLDEST,or REPLACE_MIDDLE
Parameters:
  meshFlag - if MESH_PUSH the vertex is pushed into the mesh buffer



addVertex
void addVertex(Point3f pos, Vector3f norm, Color4f color, int stripFlag, int meshFlag)(Code)
Copy vertex data and add it to the end of this stream.
Parameters:
  pos - position data
Parameters:
  norm - normal data
Parameters:
  color - color data
Parameters:
  stripFlag - vertex replacement flag, either RESTART, REPLACE_OLDEST,or REPLACE_MIDDLE
Parameters:
  meshFlag - if MESH_PUSH the vertex is pushed into the mesh buffer



addVertex
void addVertex(Point3f pos, Vector3f norm, Object color, int stripFlag, int meshFlag)(Code)
Copy vertex data and add it to the end of this stream.
Parameters:
  pos - position data
Parameters:
  norm - normal data
Parameters:
  color - color data, either Color3f or Color4f, determined bycurrent vertex format
Parameters:
  stripFlag - vertex replacement flag, either RESTART, REPLACE_OLDEST,or REPLACE_MIDDLE
Parameters:
  meshFlag - if MESH_PUSH the vertex is pushed into the mesh buffer



getByteCount
int getByteCount()(Code)
Retrieve the total size of the uncompressed geometric data in bytes, excluding mesh buffer references. uncompressed byte count



getMeshReferenceCount
int getMeshReferenceCount()(Code)
Retrieve the number of mesh buffer references created for this stream. mesh buffer reference count



getModelBounds
public Point3d[] getModelBounds()(Code)
Get the original bounds of the coordinate data, in modeling coordinates. Coordinate data is positioned and scaled to a normalized cube after compression. Point3d array of length 2, where the 1st Point3d is the lowerbounds and the 2nd Point3d is the upper bounds.
since:
   Java 3D 1.3



getNormalizedBounds
public Point3d[] getNormalizedBounds()(Code)
Get the bounds of the compressed object in normalized coordinates. These have an maximum bounds by [-1.0 .. +1.0] across each axis. Point3d array of length 2, where the 1st Point3d is the lowerbounds and the 2nd Point3d is the upper bounds.
since:
   Java 3D 1.3



getVertexCount
int getVertexCount()(Code)
Retrieve the the number of vertices created for this stream, excluding mesh buffer references. vertex count



outputCommands
void outputCommands(HuffmanTable huffmanTable, CommandStream outputBuffer)(Code)
Iterates across all compression stream elements and builds the compressed geometry command stream output.


Parameters:
  huffmanTable - Table which maps geometric elements in this streamto tags describing the encoding parameters (length, shift, andabsolute/relative status) to be used for their representations in thecompressed output. All tags must be 6 bits or less in length, and thesum of the number of bits in the tag plus the number of bits in thedata it describes must be at least 6 bits in length.
Parameters:
  outputBuffer - CommandStream to use for collecting the compressedbits.




print
void print()(Code)
Print the stream to standard output.



quantize
void quantize(HuffmanTable huffmanTable)(Code)
Iterates across all compression stream elements and applies quantization parameters, encoding consecutive vertices as delta values whenever possible. Each geometric element is mapped to a HuffmanNode object containing its resulting bit length, right shift (trailing 0 count), and absolute or relative status.

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.


Parameters:
  huffmanTable - Table which will map geometric compression streamelements to HuffmanNode objects describing each element's datarepresentation. This table can then be processed with Huffman'salgorithm to optimize the bit length of descriptor tags according tothe number of geometric elements mapped to each tag.




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.