Class NodeComponent
java.lang.Object
javax.media.j3d.SceneGraphObject
javax.media.j3d.NodeComponent
- Direct Known Subclasses:
Alpha, Appearance, AuralAttributes, ColoringAttributes, DepthComponent, Font3D, Geometry, ImageComponent, LineAttributes, Material, MediaContainer, PointAttributes, PolygonAttributes, RenderingAttributes, Shader, ShaderAttribute, ShaderAttributeSet, ShaderProgram, TexCoordGeneration, Texture, TextureAttributes, TextureUnitState, TransparencyAttributes
NodeComponent is a common superclass for all scene graph node
component objects such as: Geometry, Appearance, Material, Texture, etc.
For more information, see the Introduction to the Java 3D API.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.cloneNodeComponent(boolean forceDuplicate) Used to create a new instance of a NodeComponent object.voidduplicateNodeComponent(NodeComponent originalNodeComponent) Deprecated.As of Java 3D version 1.2, replaced byduplicateNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate)voidduplicateNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate) Copies all node information fromoriginalNodeComponentinto the current node.booleanReturns this node's duplicateOnCloneTree value.voidsetDuplicateOnCloneTree(boolean duplicate) Sets this node's duplicateOnCloneTree value.
-
Constructor Details
-
NodeComponent
public NodeComponent()Constructs a NodeComponent object with default parameters. The default values are as follows:-
duplicate on clone tree : false
-
-
Method Details
-
setDuplicateOnCloneTree
public 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 acloneTreeoperation. A value oftruemeans that this NodeComponent object should be duplicated, while a value offalseindicates that this NodeComponent object's reference will be copied into the newly cloned object. This value can be overriden via theforceDuplicateparameter of thecloneTreemethod.- Parameters:
duplicate- the value to set.- See Also:
-
getDuplicateOnCloneTree
public 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 acloneTreeoperation. A value oftruemeans that this NodeComponent object should be duplicated, while a value offalseindicates that this NodeComponent object's reference will be copied into the newly cloned object. This value can be overriden via theforceDuplicateparameter of thecloneTreemethod.- Returns:
- the value of this node's duplicateOnCloneTree
- See Also:
-
cloneNodeComponent
Deprecated.As of Java 3D version 1.2, replaced bycloneNodeComponent(boolean forceDuplicate) -
duplicateNodeComponent
Deprecated.As of Java 3D version 1.2, replaced byduplicateNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate)NOTE: Applications should not call this method directly. It should only be called by the cloneNode method. -
duplicateNodeComponent
Copies all node information fromoriginalNodeComponentinto the current node. This method is called from thecloneNodeComponentmethod which is, in turn, called by thecloneNodemethod.
NOTE: Applications should not call this method directly. It should only be called by the cloneNode method.- Parameters:
originalNodeComponent- the node to duplicate.forceDuplicate- when set totrue, causes theduplicateOnCloneTreeflag to be ignored. Whenfalse, the value of each node'sduplicateOnCloneTreevariable determines whether NodeComponent data is duplicated or copied.- Throws:
RestrictedAccessException- if forceDuplicate is set and this object is part of a compiled scenegraph- Since:
- Java 3D 1.2
- See Also:
-
cloneNodeComponent
Used to create a new instance of a NodeComponent object. This routine is called bycloneNodeto duplicate the current node.
cloneNodeComponentshould be overridden by any user subclassed NodeComponent objects. All subclasses must have theircloneNodeComponentmethod consist of the following lines:public NodeComponent cloneNodeComponent(boolean forceDuplicate) { UserNodeComponent unc = new UserNodeComponent(); unc.duplicateNodeComponent(this, forceDuplicate); return unc; }- Parameters:
forceDuplicate- when set totrue, causes theduplicateOnCloneTreeflag to be ignored. Whenfalse, the value of each node'sduplicateOnCloneTreevariable determines whether NodeComponent data is duplicated or copied.- Throws:
RestrictedAccessException- if forceDuplicate is set and this object is part of a compiled scenegraph- Since:
- Java 3D 1.2
- See Also:
-
cloneNodeComponent(boolean forceDuplicate)