javax.media.j3d
Class NodeComponent
java.lang.Object
|
+--javax.media.j3d.SceneGraphObject
|
+--javax.media.j3d.NodeComponent
- Direct Known Subclasses:
- Appearance, AuralAttributes, ColoringAttributes, DepthComponent, Geometry, ImageComponent, LineAttributes, Material, MediaContainer, PointAttributes, PolygonAttributes, RenderingAttributes, TexCoordGeneration, Texture, TextureAttributes, TransparencyAttributes
- public abstract class NodeComponent
- extends SceneGraphObject
NodeComponent is a common superclass for all scene graph node
component objects such as: Geometry, Appearance, Material, Texture, etc.
Constructor Summary |
NodeComponent()
Constructs a NodeComponent object with default parameters. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
NodeComponent
public NodeComponent()
- Constructs a NodeComponent object with default parameters.
The default values are as follows:
duplicate on clone tree : false
setDuplicateOnCloneTree
public final void setDuplicateOnCloneTree(boolean duplicate)
- Sets this node's duplicateOnCloneTree value. The
duplicateOnCloneTree value is used to determine if NodeComponent
objects are to be duplicated or referenced during a
cloneTree
operation. A value of true
means
that this NodeComponent object should be duplicated, while a value
of false
indicates that this NodeComponent object's
reference will be copied into the newly cloned object. This value
can be overriden via the forceDuplicate
parameter of
the cloneTree
method.
- Parameters:
duplicate
- the value to set.- See Also:
Node.cloneTree()
getDuplicateOnCloneTree
public final boolean getDuplicateOnCloneTree()
- Returns this node's duplicateOnCloneTree value. The
duplicateOnCloneTree value is used to determine if NodeComponent
objects are to be duplicated or referenced during a
cloneTree
operation. A value of true
means
that this NodeComponent object should be duplicated, while a value
of false
indicates that this NodeComponent object's
reference will be copied into the newly cloned object. This value
can be overriden via the forceDuplicate
parameter of
the cloneTree
method.
- Returns:
- the value of this node's duplicateOnCloneTree
- See Also:
Node.cloneTree()
cloneNodeComponent
public NodeComponent cloneNodeComponent()
- Used to create a new instance of a NodeComponent object. This
routine is called
by
cloneNode
to duplicate the current node.
cloneNodeComponent
should be overridden by any user
subclassed NodeComponent objects. All subclasses must have their
cloneNodeComponent
method consist of the following lines:
public NodeComponent cloneNodeComponent() {
UserNodeComponent unc = new UserNodeComponent();
unc.duplicateNodeComponent(this);
return unc;
}
- Throws:
- RestrictedAccessException - if this object is part of a
compiled scenegraph
- See Also:
duplicateNodeComponent(javax.media.j3d.NodeComponent)
,
Node.cloneNode(boolean)
,
Node.cloneTree()
duplicateNodeComponent
public abstract void duplicateNodeComponent(NodeComponent originalNodeComponent)
- Copies all node information from
originalNodeComponent
into the current node. This method is called from the
cloneNodeComponent
method which is, in turn, called
by the cloneNode
method.
- Parameters:
originalNodeComponent
- the node to duplicate.- Throws:
- RestrictedAccessException - if this object is part of a
compiled scenegraph
- See Also:
cloneNodeComponent()
,
Node.cloneNode(boolean)
,
Node.cloneTree()