Java Doc for CompressedGeometryData.java in  » 6.0-JDK-Modules » java-3d » com » sun » j3d » utils » geometry » 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.geometry.compression 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.j3d.utils.geometry.compression.CompressedGeometryData

CompressedGeometryData
public class CompressedGeometryData extends Object (Code)
The compressed geometry object is used to store geometry in a compressed format. Using compressed geometry may increase the speed objects can be sent over the network. Note that the geometry will be decompressed in memory, so the application will not see any memory savings.

Compressed geometry may be passed to this CompressedGeometryData object in one of two ways: by copying the data into this object using the existing constructor, or by passing a reference to the data.

  • By Copying: In by-copy mode, the CompressedGeometryData constructor copies the buffer of compressed geometry data into this CompressedGeometryData object. This is appropriate for many applications, and allows Java 3D to verify the data once and then not worry about it again.
  • By Reference: In by-reference mode, the compressed geometry data is accessed by reference, directly from the user's array. To use this feature, you need to construct a CompressedGeometryData object with the byReference flag set to true. In this mode, a reference to the input data is saved, but the data itself is not necessarily copied. Note that the compressed geometry header is still copied into this compressed geometry object. Data referenced by a CompressedGeometryData object must not be modified after the CompressedGeometryData object is constructed. Applications must exercise care not to violate this rule. If any referenced compressed geometry data is modified after construction, the results are undefined.

since:
   Java 3D 1.5

Inner Class :public static class Header extends Object


Constructor Summary
public  CompressedGeometryData(Header hdr, byte[] compressedGeometry)
     Creates a new CompressedGeometryData object by copying the specified compressed geometry data into this object. If the version number of compressed geometry, as specified by the Header, is incompatible with the supported version of compressed geometry, then an exception will be thrown.
Parameters:
  hdr - the compressed geometry header.
public  CompressedGeometryData(Header hdr, byte[] compressedGeometry, boolean byReference)
     Creates a new CompressedGeometryData object.
public  CompressedGeometryData(Header hdr, J3DBuffer compressedGeometry)
     Creates a new CompressedGeometryData object.

Method Summary
public  Shape3D[]decompress()
     Decompresses the compressed geometry.
public  intgetByteCount()
     Returns the size, in bytes, of the compressed geometry buffer.
public  voidgetCompressedGeometry(byte[] compressedGeometry)
     Retrieves the compressed geometry associated with the CompressedGeometryData object.
public  J3DBuffergetCompressedGeometryBuffer()
     Gets the compressed geometry data buffer reference, which is always null since NIO buffers are not supported for CompressedGeometryData objects.
public  voidgetCompressedGeometryHeader(Header hdr)
     Copies the compressed geometry header from the CompressedGeometryData object into the passed in parameter.
public  byte[]getCompressedGeometryRef()
     Gets the compressed geometry data reference.
public  booleanisByReference()
     Retrieves the data access mode for this CompressedGeometryData object.


Constructor Detail
CompressedGeometryData
public CompressedGeometryData(Header hdr, byte[] compressedGeometry)(Code)
Creates a new CompressedGeometryData object by copying the specified compressed geometry data into this object. If the version number of compressed geometry, as specified by the Header, is incompatible with the supported version of compressed geometry, then an exception will be thrown.
Parameters:
  hdr - the compressed geometry header. This is copiedinto this CompressedGeometryData object.
Parameters:
  compressedGeometry - the compressed geometry data. Thegeometry must conform to the format described in Appendix B ofthe Java 3D API Specification.
exception:
  IllegalArgumentException - if a problem is detected with theheader.



CompressedGeometryData
public CompressedGeometryData(Header hdr, byte[] compressedGeometry, boolean byReference)(Code)
Creates a new CompressedGeometryData object. The specified compressed geometry data is either copied into this object or is accessed by reference. If the version number of compressed geometry, as specified by the Header, is incompatible with the supported version of compressed geometry, then an exception will be thrown.
Parameters:
  hdr - the compressed geometry header. This is copiedinto the CompressedGeometryData object.
Parameters:
  compressedGeometry - the compressed geometry data. Thegeometry must conform to the format described in Appendix B ofthe Java 3D API Specification.
Parameters:
  byReference - a flag that indicates whether the data is copiedinto this compressed geometry object or is accessed by reference.
exception:
  IllegalArgumentException - if a problem is detected with theheader.



CompressedGeometryData
public CompressedGeometryData(Header hdr, J3DBuffer compressedGeometry)(Code)
Creates a new CompressedGeometryData object. The specified compressed geometry data is accessed by reference from the specified buffer. If the version number of compressed geometry, as specified by the Header, is incompatible with the supported version of compressed geometry, then an exception will be thrown.
Parameters:
  hdr - the compressed geometry header. This is copiedinto the CompressedGeometryData object.
Parameters:
  compressedGeometry - a buffer containing an NIO byte bufferof compressed geometry data. Thegeometry must conform to the format described in Appendix B ofthe Java 3D API Specification.
exception:
  UnsupportedOperationException - this method is notyet implemented
exception:
  IllegalArgumentException - if a problem is detected with theheader,or if the java.nio.Buffer contained in the specified J3DBufferis not a java.nio.ByteBuffer object.
See Also:   Header




Method Detail
decompress
public Shape3D[] decompress()(Code)
Decompresses the compressed geometry. Returns an array of Shape nodes containing the decompressed geometry objects, or null if the version number of the compressed geometry is incompatible with the decompressor in the current version of Java 3D. an array of Shape nodes containing thegeometry decompressed from this CompressedGeometryDataobject, or null if its version is incompatible



getByteCount
public int getByteCount()(Code)
Returns the size, in bytes, of the compressed geometry buffer. The size of the compressed geometry header is not included. the size, in bytes, of the compressed geometry buffer.



getCompressedGeometry
public void getCompressedGeometry(byte[] compressedGeometry)(Code)
Retrieves the compressed geometry associated with the CompressedGeometryData object. Copies the compressed geometry from the CompressedGeometryData node into the given array. The array must be large enough to hold all of the bytes. The individual array elements must be allocated by the caller.
Parameters:
  compressedGeometry - the array into which to copy the compressedgeometry.
exception:
  IllegalStateException - if the data access mode for thisobject is by-reference.
exception:
  ArrayIndexOutOfBoundsException - if compressedGeometry bytearray is not large enough to receive the compressed geometry



getCompressedGeometryBuffer
public J3DBuffer getCompressedGeometryBuffer()(Code)
Gets the compressed geometry data buffer reference, which is always null since NIO buffers are not supported for CompressedGeometryData objects. null



getCompressedGeometryHeader
public void getCompressedGeometryHeader(Header hdr)(Code)
Copies the compressed geometry header from the CompressedGeometryData object into the passed in parameter.
Parameters:
  hdr - the Header object into which to copy theCompressedGeometryData object's header; the offset field may differfrom that which was originally specified if a copy of the originalcompressed geometry byte array was created.



getCompressedGeometryRef
public byte[] getCompressedGeometryRef()(Code)
Gets the compressed geometry data reference. the current compressed geometry data reference.
exception:
  IllegalStateException - if the data access mode for thisobject is not by-reference.



isByReference
public boolean isByReference()(Code)
Retrieves the data access mode for this CompressedGeometryData object. true if the data access mode for thisCompressedGeometryData object is by-reference;false if the data access mode is by-copying.



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.