javax.media.j3d
Class DepthComponentNative

java.lang.Object
  extended by javax.media.j3d.SceneGraphObject
      extended by javax.media.j3d.NodeComponent
          extended by javax.media.j3d.DepthComponent
              extended by javax.media.j3d.DepthComponentNative

public class DepthComponentNative
extends DepthComponent

A 2D array of depth (Z) values stored in the most efficient format for a particular device. Values are not accessible by the user and may only be used to read the Z values and subsequently write them back.


Field Summary
 
Fields inherited from class javax.media.j3d.DepthComponent
ALLOW_DATA_READ, ALLOW_SIZE_READ
 
Fields inherited from class javax.media.j3d.NodeComponent
forceDuplicate
 
Fields inherited from class javax.media.j3d.SceneGraphObject
nodeHashtable, retained
 
Constructor Summary
DepthComponentNative()
          Package scope defualt constructor for use by cloneNodeComponent
DepthComponentNative(int width, int height)
          Constructs a new native depth (z-buffer) component object with the specified width and height.
 
Method Summary
 NodeComponent cloneNodeComponent()
          Creates a new DepthComponentNative object.
(package private)  void createRetained()
          Creates a retained mode DepthComponentIntRetained object that this DepthComponentInt component object will point to.
(package private)  void duplicateAttributes(NodeComponent originalNodeComponent, boolean forceDuplicate)
          Copies all node information from originalNodeComponent into the current node.
(package private)  void getDepthData(int[] depthData)
          Copies the depth data from this object to the specified array.
 
Methods inherited from class javax.media.j3d.DepthComponent
getHeight, getWidth
 
Methods inherited from class javax.media.j3d.NodeComponent
checkDuplicateNodeComponent, cloneNodeComponent, duplicateChild, duplicateNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree, validateImageIllegalSharing
 
Methods inherited from class javax.media.j3d.SceneGraphObject
capabilityBitsEmpty, checkForLiveOrCompiled, clearCapability, clearCapabilityIsFrequent, clearLive, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getNamePrefix, getNodeComponent, getUserData, isCompiled, isLive, isLiveOrCompiled, setCapability, setCapabilityIsFrequent, setCompiled, setDefaultReadCapabilities, setLive, setName, setUserData, toString, updateNodeReferences
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DepthComponentNative

DepthComponentNative()
Package scope defualt constructor for use by cloneNodeComponent


DepthComponentNative

public DepthComponentNative(int width,
                            int height)
Constructs a new native depth (z-buffer) component object with the specified width and height.

Parameters:
width - the width of the array of depth values
height - the height of the array of depth values
Method Detail

getDepthData

void getDepthData(int[] depthData)
Copies the depth data from this object to the specified array.

Parameters:
depthData - array of ints that will receive a copy of the depth data

createRetained

void createRetained()
Creates a retained mode DepthComponentIntRetained object that this DepthComponentInt component object will point to.

Overrides:
createRetained in class NodeComponent

cloneNodeComponent

public NodeComponent cloneNodeComponent()
Creates a new DepthComponentNative object. Called from a Leaf node's duplicateNode method.

Overrides:
cloneNodeComponent in class NodeComponent
Returns:
a duplicate of the DepthComponentNative object.
See Also:
Node.duplicateNode(javax.media.j3d.Node, boolean), Node.cloneTree(), NodeComponent.setDuplicateOnCloneTree(boolean)

duplicateAttributes

void duplicateAttributes(NodeComponent originalNodeComponent,
                         boolean forceDuplicate)
Copies all node information from originalNodeComponent into the current node. This method is called from the duplicateNode method. This routine does the actual duplication of all "local data" (any data defined in this object).

Overrides:
duplicateAttributes in class NodeComponent
Parameters:
originalNodeComponent - 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:
Node.cloneTree(), NodeComponent.setDuplicateOnCloneTree(boolean)


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.