Java Doc for CompressedGeometry.java in  » 6.0-JDK-Modules » java-3d » javax » media » j3d » 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 » javax.media.j3d 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.media.j3d.SceneGraphObject
      javax.media.j3d.NodeComponent
         javax.media.j3d.Geometry
            javax.media.j3d.CompressedGeometry

All known Subclasses:   org.jdesktop.j3d.examples.picking.BoltCG,  org.jdesktop.j3d.examples.picking.GullCG,
CompressedGeometry
public class CompressedGeometry extends Geometry (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 CompressedGeometry 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: The existing CompressedGeometry constructor copies the buffer of compressed geometry data into this CompressedGeometry 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: A new constructor and set of methods in Java 3D version 1.2 allows compressed geometry data to be accessed by reference, directly from the user's array. To use this feature, you need to construct a CompressedGeometry 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 CompressedGeometry object must not be modified after the CompressedGeometry 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.


Field Summary
final public static  intALLOW_COUNT_READ
     Specifies that this CompressedGeometry object allows reading its byte count information.
final public static  intALLOW_GEOMETRY_READ
     Specifies that this CompressedGeometry object allows reading its geometry data component information.
final public static  intALLOW_HEADER_READ
     Specifies that this CompressedGeometry object allows reading its header information.
final public static  intALLOW_REF_DATA_READ
     Specifies that this CompressedGeometry allows reading the geometry data reference information for this object.
 CompressedGeometryHeadercgHeader
    

Constructor Summary
 CompressedGeometry()
     Package scoped default constructor for use by cloneNodeComponent.
public  CompressedGeometry(CompressedGeometryHeader hdr, byte[] compressedGeometry)
     Creates a new CompressedGeometry NodeComponent by copying the specified compressed geometry data into this object. If the version number of compressed geometry, as specified by the CompressedGeometryHeader, is incompatible with the supported version of compressed geometry in the current version of Java 3D, then the compressed geometry object will not be rendered.
Parameters:
  hdr - the compressed geometry header.
public  CompressedGeometry(CompressedGeometryHeader hdr, byte[] compressedGeometry, boolean byReference)
     Creates a new CompressedGeometry NodeComponent.
public  CompressedGeometry(CompressedGeometryHeader hdr, J3DBuffer compressedGeometry)
     This constructor is not implemented.

Method Summary
public  NodeComponentcloneNodeComponent()
    
 voidcreateRetained()
     Creates the retained mode CompressedGeometryRetained object that this CompressedGeometry object will point to.
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 CompressedGeometry NodeComponent object.
public  J3DBuffergetCompressedGeometryBuffer()
     Gets the compressed geometry data buffer reference, which is always null since NIO buffers are not supported for CompressedGeometry objects.
public  voidgetCompressedGeometryHeader(CompressedGeometryHeader hdr)
     Copies the compressed geometry header from the CompressedGeometry NodeComponent into the passed in parameter.
public  byte[]getCompressedGeometryRef()
     Gets the compressed geometry data reference.
public  booleanisByReference()
     Retrieves the data access mode for this CompressedGeometry object.

Field Detail
ALLOW_COUNT_READ
final public static int ALLOW_COUNT_READ(Code)
Specifies that this CompressedGeometry object allows reading its byte count information.



ALLOW_GEOMETRY_READ
final public static int ALLOW_GEOMETRY_READ(Code)
Specifies that this CompressedGeometry object allows reading its geometry data component information.



ALLOW_HEADER_READ
final public static int ALLOW_HEADER_READ(Code)
Specifies that this CompressedGeometry object allows reading its header information.



ALLOW_REF_DATA_READ
final public static int ALLOW_REF_DATA_READ(Code)
Specifies that this CompressedGeometry allows reading the geometry data reference information for this object. This is only used in by-reference geometry mode.
since:
   Java 3D 1.2



cgHeader
CompressedGeometryHeader cgHeader(Code)




Constructor Detail
CompressedGeometry
CompressedGeometry()(Code)
Package scoped default constructor for use by cloneNodeComponent.



CompressedGeometry
public CompressedGeometry(CompressedGeometryHeader hdr, byte[] compressedGeometry)(Code)
Creates a new CompressedGeometry NodeComponent by copying the specified compressed geometry data into this object. If the version number of compressed geometry, as specified by the CompressedGeometryHeader, is incompatible with the supported version of compressed geometry in the current version of Java 3D, then the compressed geometry object will not be rendered.
Parameters:
  hdr - the compressed geometry header. This is copiedinto the CompressedGeometry NodeComponent.
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
See Also:   CompressedGeometryHeader
See Also:   Canvas3D.queryProperties



CompressedGeometry
public CompressedGeometry(CompressedGeometryHeader hdr, byte[] compressedGeometry, boolean byReference)(Code)
Creates a new CompressedGeometry NodeComponent. 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 CompressedGeometryHeader, is incompatible with the supported version of compressed geometry in the current version of Java 3D, the compressed geometry object will not be rendered.
Parameters:
  hdr - the compressed geometry header. This is copiedinto the CompressedGeometry NodeComponent.
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
See Also:   CompressedGeometryHeader
See Also:   Canvas3D.queryProperties
since:
   Java 3D 1.2



CompressedGeometry
public CompressedGeometry(CompressedGeometryHeader hdr, J3DBuffer compressedGeometry)(Code)
This constructor is not implemented.
exception:
  UnsupportedOperationException - this constructor is notimplemented
since:
   Java 3D 1.3




Method Detail
cloneNodeComponent
public NodeComponent cloneNodeComponent()(Code)



createRetained
void createRetained()(Code)
Creates the retained mode CompressedGeometryRetained object that this CompressedGeometry object will point to.



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 CompressedGeometry NodeComponentobject, or null if its version is incompatible
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



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.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getCompressedGeometry
public void getCompressedGeometry(byte[] compressedGeometry)(Code)
Retrieves the compressed geometry associated with the CompressedGeometry NodeComponent object. Copies the compressed geometry from the CompressedGeometry 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:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
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 CompressedGeometry objects. null
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
since:
   Java 3D 1.3



getCompressedGeometryHeader
public void getCompressedGeometryHeader(CompressedGeometryHeader hdr)(Code)
Copies the compressed geometry header from the CompressedGeometry NodeComponent into the passed in parameter.
Parameters:
  hdr - the CompressedGeometryHeader object into which to copy theCompressedGeometry NodeComponent's header; the offset field may differfrom that which was originally specified if a copy of the originalcompressed geometry byte array was created.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
See Also:   CompressedGeometryHeader



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.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
since:
   Java 3D 1.2



isByReference
public boolean isByReference()(Code)
Retrieves the data access mode for this CompressedGeometry object. true if the data access mode for thisCompressedGeometry object is by-reference;false if the data access mode is by-copying.
since:
   Java 3D 1.2



Fields inherited from javax.media.j3d.Geometry
final public static int ALLOW_INTERSECT(Code)(Java Doc)


Fields inherited from javax.media.j3d.NodeComponent
boolean forceDuplicate(Code)(Java Doc)

Methods inherited from javax.media.j3d.NodeComponent
final void checkDuplicateNodeComponent(NodeComponent originalNodeComponent)(Code)(Java Doc)
public NodeComponent cloneNodeComponent()(Code)(Java Doc)
public NodeComponent cloneNodeComponent(boolean forceDuplicate)(Code)(Java Doc)
void createRetained()(Code)(Java Doc)
void duplicateAttributes(NodeComponent originalNode, boolean forceDuplicate)(Code)(Java Doc)
boolean duplicateChild()(Code)(Java Doc)
public void duplicateNodeComponent(NodeComponent originalNodeComponent)(Code)(Java Doc)
public void duplicateNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate)(Code)(Java Doc)
public boolean getDuplicateOnCloneTree()(Code)(Java Doc)
public void setDuplicateOnCloneTree(boolean duplicate)(Code)(Java Doc)
void validateImageIllegalSharing(ImageComponent image)(Code)(Java Doc)

Fields inherited from javax.media.j3d.SceneGraphObject
Hashtable nodeHashtable(Code)(Java Doc)
SceneGraphObjectRetained retained(Code)(Java Doc)

Methods inherited from javax.media.j3d.SceneGraphObject
final boolean capabilityBitsEmpty()(Code)(Java Doc)
final void checkForLiveOrCompiled()(Code)(Java Doc)
final public void clearCapability(int bit)(Code)(Java Doc)
final public void clearCapabilityIsFrequent(int bit)(Code)(Java Doc)
final void clearLive()(Code)(Java Doc)
void createRetained()(Code)(Java Doc)
protected void duplicateSceneGraphObject(SceneGraphObject originalNode)(Code)(Java Doc)
final public boolean getCapability(int bit)(Code)(Java Doc)
final public boolean getCapabilityIsFrequent(int bit)(Code)(Java Doc)
public String getName()(Code)(Java Doc)
String getNamePrefix()(Code)(Java Doc)
NodeComponent getNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate, Hashtable hashtable)(Code)(Java Doc)
public Object getUserData()(Code)(Java Doc)
final public boolean isCompiled()(Code)(Java Doc)
final public boolean isLive()(Code)(Java Doc)
final boolean isLiveOrCompiled()(Code)(Java Doc)
final public void setCapability(int bit)(Code)(Java Doc)
final public void setCapabilityIsFrequent(int bit)(Code)(Java Doc)
final void setCompiled()(Code)(Java Doc)
void setDefaultReadCapabilities(int[] bits)(Code)(Java Doc)
final void setLive()(Code)(Java Doc)
public void setName(String name)(Code)(Java Doc)
public void setUserData(Object userData)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void updateNodeReferences(NodeReferenceTable referenceTable)(Code)(Java Doc)

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.