Java Doc for SceneGraphObject.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

All known Subclasses:   javax.media.j3d.NodeComponent,  javax.media.j3d.Node,
SceneGraphObject
abstract public class SceneGraphObject extends Object (Code)
SceneGraphObject is the common superclass for all scene graph objects. Scene graph objects are classified into two main types: nodes and node components. The Node object is the common superclass of all nodes, which includes TransformGroup, Shape3D, etc. The NodeComponent object is the common superclass of all node components, which includes Geometry, Appearance, etc.

All scene graph objects have a name, a user data object, a set of capability bits, and a set of capabilityIsFrequent bits.

Capability bits control whether a particular attribute in a node or node component is readable or writable. For live or compiled scene graphs, only those attributes whose capabilities are set before the scene graph is compiled or made live may be read or written. The default value for all read capability bits is true, meaning that all attributes may be read by default. The default value for all write capability bits is false, meaning that no attributes may be written by default. Read capability bits are defined as those capability bits of the form ALLOW_*_READ, plus the ALLOW_INTERSECT capability bit. Write capability bits are defined as those capability bits of the form ALLOW_*_WRITE, plus the ALLOW_CHILDREN_EXTEND and ALLOW_DETACH capability bits.

NOTE that the ENABLE_COLLISION_REPORTING and ENABLE_PICK_REPORTING bits are not really capability bits, although they are set with the setCapability method. The default value for each of the ENABLE_*_REPORTING bits is false.

For more information, see the Introduction to the Java 3D API.



Field Summary
 HashtablenodeHashtable
    
 SceneGraphObjectRetainedretained
    

Constructor Summary
public  SceneGraphObject()
     Constructs a SceneGraphObject with default parameters.

Method Summary
final  booleancapabilityBitsEmpty()
    
final  voidcheckForLiveOrCompiled()
    
final public  voidclearCapability(int bit)
     Clear the specified capability bit.
final public  voidclearCapabilityIsFrequent(int bit)
     Clears the isFrequent bit associated with the specified capability bit.
final  voidclearLive()
     Clears an internal flag which indicates that this scene graph object is no longer part of a live scene graph.
 voidcreateRetained()
     Creates the retained mode object that this scene graph object will point to.
protected  voidduplicateSceneGraphObject(SceneGraphObject originalNode)
     Copies all SceneGraphObject information from originalNode into the current node.
final public  booleangetCapability(int bit)
     Retrieves the specified capability bit.
final public  booleangetCapabilityIsFrequent(int bit)
     Retrieves the isFrequent bit associated with the specified capability bit.
public  StringgetName()
     Returns the name of this object.
 StringgetNamePrefix()
    
 NodeComponentgetNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate, Hashtable hashtable)
     If forceDuplicate is true or duplicateOnCloneTree flag is true.
public  ObjectgetUserData()
     Retrieves the userData field from this scene graph object.
final public  booleanisCompiled()
     Returns a flag indicating whether the node is part of a scene graph that has been compiled.
final public  booleanisLive()
     Returns a flag indicating whether the node is part of a live scene graph.
final  booleanisLiveOrCompiled()
     Returns a flag indicating whether the node is part of a live scene graph or a compiled scene graph.
final public  voidsetCapability(int bit)
     Sets the specified capability bit.
final public  voidsetCapabilityIsFrequent(int bit)
     Sets the isFrequent bit associated with the specified capability bit.
final  voidsetCompiled()
     Sets an internal flag which indicates that this scene graph object has been compiled.
 voidsetDefaultReadCapabilities(int[] bits)
    
final  voidsetLive()
     Sets an internal flag which indicates that this scene graph object is part of a live scene graph.
public  voidsetName(String name)
     Sets the name of this object.
public  voidsetUserData(Object userData)
     Sets the userData field associated with this scene graph object.
public  StringtoString()
     Returns a String representation of this SceneGraphObject.
public  voidupdateNodeReferences(NodeReferenceTable referenceTable)
     Callback used to allow a node to check if any scene graph objects referenced by that node have been duplicated via a call to cloneTree. This method is called by cloneTree after all nodes in the sub-graph have been duplicated.

Field Detail
nodeHashtable
Hashtable nodeHashtable(Code)



retained
SceneGraphObjectRetained retained(Code)




Constructor Detail
SceneGraphObject
public SceneGraphObject()(Code)
Constructs a SceneGraphObject with default parameters. The default values are as follows:
    all read capability bits : set (true)
    all write capability bits : clear (false)
    all capabilityIsFrequent bits : set (true)
    isLive : false
    isCompiled : false
    user data : null
    name : null




Method Detail
capabilityBitsEmpty
final boolean capabilityBitsEmpty()(Code)



checkForLiveOrCompiled
final void checkForLiveOrCompiled()(Code)



clearCapability
final public void clearCapability(int bit)(Code)
Clear the specified capability bit. Note that only one capability bit may be cleared per method invocation--capability bits cannot be ORed together.
Parameters:
  bit - the bit to clear
exception:
  RestrictedAccessException - if this object is part of liveor compiled scene graph



clearCapabilityIsFrequent
final public void clearCapabilityIsFrequent(int bit)(Code)
Clears the isFrequent bit associated with the specified capability bit. Clearing the isFrequent bit indicates that the application will infrequently access or modify those attributes permitted by the associated capability bit. This can be used by Java 3D as a hint to enable certain optimizations that it might otherwise avoid, for example, optimizations that could cause those accesses or modifications to be expensive.

Unlike clearCapability, this method may be called on a live scene graph object (but not on a compiled object).

Note that only one isFrequent bit, for a single capability bit, may be cleared per method invocation--capability bits cannot be ORed together.
Parameters:
  bit - the capability bit for which to clear the associatedisFrequent bit
exception:
  RestrictedAccessException - if this object is part of acompiled scene graph
since:
   Java 3D 1.3




clearLive
final void clearLive()(Code)
Clears an internal flag which indicates that this scene graph object is no longer part of a live scene graph.



createRetained
void createRetained()(Code)
Creates the retained mode object that this scene graph object will point to. This should be overridden by those classes that have a specific retained mode object.



duplicateSceneGraphObject
protected void duplicateSceneGraphObject(SceneGraphObject originalNode)(Code)
Copies all SceneGraphObject information from originalNode into the current node. This method is called from the cloneNode method which is, in turn, called by the cloneTree method.

NOTE: Applications should not call this method directly. It should only be called by the cloneNode method.
Parameters:
  originalNode - the original node to duplicate.
See Also:   Group.cloneNode
See Also:   Node.duplicateNode
See Also:   Node.cloneTree
See Also:   NodeComponent.setDuplicateOnCloneTree




getCapability
final public boolean getCapability(int bit)(Code)
Retrieves the specified capability bit. Note that only one capability bit may be retrieved per method invocation--capability bits cannot be ORed together.
Parameters:
  bit - the bit whose value is returned true if the bit is set, false if the bit is clear



getCapabilityIsFrequent
final public boolean getCapabilityIsFrequent(int bit)(Code)
Retrieves the isFrequent bit associated with the specified capability bit. Note that only one isFrequent bit, for a single capability bit, may be retrieved per method invocation--capability bits cannot be ORed together.
Parameters:
  bit - the bit whose value is returned true if the isFrequent bit is set, false if the isFrequentbit is clear
since:
   Java 3D 1.3



getName
public String getName()(Code)
Returns the name of this object. the name of this object
since:
   Java 3D 1.4



getNamePrefix
String getNamePrefix()(Code)



getNodeComponent
NodeComponent getNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate, Hashtable hashtable)(Code)
If forceDuplicate is true or duplicateOnCloneTree flag is true. This procedure will return a clone of originalNode or the value in in nodeHashtable if found. Otherwise return originalNode This method is called from the duplicateAttributes method during cloneNodeComponent.
Parameters:
  originalNodeComponent - the original node to duplicate.
Parameters:
  forceDuplicate - when set to true, causes theduplicateOnCloneTree flag to be ignored. Whenfalse, the value of each node'sduplicateOnCloneTree variable determines whetherNodeComponent data is duplicated or copied.
Parameters:
  nodeHashtable - is used to keep track of mapping between old and new node references.



getUserData
public Object getUserData()(Code)
Retrieves the userData field from this scene graph object. the current userData field



isCompiled
final public boolean isCompiled()(Code)
Returns a flag indicating whether the node is part of a scene graph that has been compiled. If so, then only those capabilities explicitly allowed by the object's capability bits are allowed. true if node is part of a compiled scene graph, else false



isLive
final public boolean isLive()(Code)
Returns a flag indicating whether the node is part of a live scene graph. true if node is part of a live scene graph, else false



isLiveOrCompiled
final boolean isLiveOrCompiled()(Code)
Returns a flag indicating whether the node is part of a live scene graph or a compiled scene graph. true if either live or compiled



setCapability
final public void setCapability(int bit)(Code)
Sets the specified capability bit. Note that only one capability bit may be set per method invocation--capability bits cannot be ORed together.
Parameters:
  bit - the bit to set
exception:
  RestrictedAccessException - if this object is part of liveor compiled scene graph



setCapabilityIsFrequent
final public void setCapabilityIsFrequent(int bit)(Code)
Sets the isFrequent bit associated with the specified capability bit. Setting the isFrequent bit indicates that the application may frequently access or modify those attributes permitted by the associated capability bit. This can be used by Java 3D as a hint to avoid certain optimizations that could cause those accesses or modifications to be expensive. By default the isFrequent bit associated with each capability bit is set.

Unlike setCapability, this method may be called on a live scene graph object (but not on a compiled object).

Note that only one isFrequent bit, for a single capability bit, may be set per method invocation--capability bits cannot be ORed together.
Parameters:
  bit - the capability bit for which to set the associatedisFrequent bit
exception:
  RestrictedAccessException - if this object is part of acompiled scene graph
since:
   Java 3D 1.3




setCompiled
final void setCompiled()(Code)
Sets an internal flag which indicates that this scene graph object has been compiled.



setDefaultReadCapabilities
void setDefaultReadCapabilities(int[] bits)(Code)
Method to set default read capability bits to true



setLive
final void setLive()(Code)
Sets an internal flag which indicates that this scene graph object is part of a live scene graph.



setName
public void setName(String name)(Code)
Sets the name of this object. Object names are for information only.
Parameters:
  name - the new name of this object
since:
   Java 3D 1.4



setUserData
public void setUserData(Object userData)(Code)
Sets the userData field associated with this scene graph object. The userData field is a reference to an arbitrary object and may be used to store any user-specific data associated with this scene graph object--it is not used by the Java 3D API. If this object is cloned, the userData field is copied to the newly cloned object.
Parameters:
  userData - a reference to the new userData field



toString
public String toString()(Code)
Returns a String representation of this SceneGraphObject. If its name is non-null, then it is concatenated with super.toString().



updateNodeReferences
public void updateNodeReferences(NodeReferenceTable referenceTable)(Code)
Callback used to allow a node to check if any scene graph objects referenced by that node have been duplicated via a call to cloneTree. This method is called by cloneTree after all nodes in the sub-graph have been duplicated. The cloned Leaf node and cloned NodeComponent's method will be called and the Leaf node/NodeComponent can then look up any object references by using the getNewObjectReference method found in the NodeReferenceTable object. If a match is found, a reference to the corresponding object in the newly cloned sub-graph is returned. If no corresponding reference is found, either a DanglingReferenceException is thrown or a reference to the original object is returned depending on the value of the allowDanglingReferences parameter passed in the cloneTree call.

NOTE: Applications should not call this method directly. It should only be called by the cloneTree method.
Parameters:
  referenceTable - a NodeReferenceTableObject that contains thegetNewObjectReference method needed to search fornew object instances.
See Also:   NodeReferenceTable
See Also:   Node.cloneTree
See Also:   DanglingReferenceException




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.