: Class SceneGraphObject

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.media.j3d
Class SceneGraphObject

    java.lang.Object
      |
      +--javax.media.j3d.SceneGraphObject

Direct Known Subclasses:
  Node, NodeComponent

public abstract class SceneGraphObject
extends java.lang.Object

SceneGraphObject is a common superclass for all scene graph component objects. This includes Node, Geometry, Appearance, etc.

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

Method Summary
`void` | `clearCapability(int bit)` Clear the specified capability bit.
`protected void` | `duplicateSceneGraphObject(SceneGraphObject originalNode)` Copies all SceneGraphObject information from `originalNode` into the current node.
`boolean` | `getCapability(int bit)` Retrieves the specified capability bit.
`java.lang.Object` | `getUserData()` Retrieves the userData field from this scene graph object.
`boolean` | `isCompiled()` Returns a flag indicating whether the node is part of a scene graph that has been compiled.
`boolean` | `isLive()` Returns a flag indicating whether the node is part of a live scene graph.
`void` | `setCapability(int bit)` Sets the specified capability bit.
`void` | `setUserData(java.lang.Object userData)` Sets the userData field associated with this scene graph object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SceneGraphObject

    public SceneGraphObject()

  Constructs a SceneGraphObject with default parameters. The default values are as follows:
  capability bits : clear (all bits)
  isLive : false
  isCompiled : false
  user data : null

Method Detail

### getCapability

    public final boolean getCapability(int bit)

  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
  Returns:
    true if the bit is set, false if the bit is clear

### setCapability

    public final void setCapability(int bit)

  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
  Throws:
    RestrictedAccessException - if this object is part of live or compiled scene graph

### clearCapability

    public final void clearCapability(int bit)

  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
  Throws:
    RestrictedAccessException - if this object is part of live or compiled scene graph

### isCompiled

    public final boolean isCompiled()

  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.
  Returns:
    true if node is part of a compiled scene graph, else false

### isLive

    public final boolean isLive()

  Returns a flag indicating whether the node is part of a live scene graph.
  Returns:
    true if node is part of a live scene graph, else false

### setUserData

    public void setUserData(java.lang.Object userData)

  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

### getUserData

    public java.lang.Object getUserData()

  Retrieves the userData field from this scene graph object.
  Returns:
    the current userData field

### duplicateSceneGraphObject

    protected void duplicateSceneGraphObject(SceneGraphObject originalNode)

  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.

  Parameters:
    `originalNode` - the original node to duplicate.
    `forceDuplicate` - when set to `true`, causes the `duplicateOnCloneTree` flag to be ignored. When `false`, the value of each node's `duplicateOnCloneTree` variable determines whether NodeComponent data is duplicated or copied.
  See Also:
    `Group.cloneNode(boolean)`, `Node.duplicateNode(javax.media.j3d.Node, boolean)`, `Node.cloneTree()`, `NodeComponent.setDuplicateOnCloneTree(boolean)`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD