javax.media.j3d
Class DepthComponentFloat

java.lang.Object
  |
  +--javax.media.j3d.SceneGraphObject
        |
        +--javax.media.j3d.NodeComponent
              |
              +--javax.media.j3d.DepthComponent
                    |
                    +--javax.media.j3d.DepthComponentFloat

public class DepthComponentFloat
extends DepthComponent

A 2D array of depth (Z) values in floating point format in the range [0,1]. A value of 0.0 indicates the closest Z value to the user while a value of 1.0 indicates the farthest Z value.


Fields inherited from class javax.media.j3d.DepthComponent
ALLOW_DATA_READ, ALLOW_SIZE_READ
 
Constructor Summary
DepthComponentFloat(int width, int height)
          Constructs a new floating-point depth (z-buffer) component object with the specified width and height.
 
Method Summary
 NodeComponent cloneNodeComponent()
          Creates a new DepthComponentFloat object.
 void duplicateNodeComponent(NodeComponent originalNodeComponent)
          Copies the information found in originalNodeComponent to the current node.
 void getDepthData(float[] depthData)
          Copies the depth data from this object to the specified array.
 void setDepthData(float[] depthData)
          Copies the specified depth data to this object.
 
Methods inherited from class javax.media.j3d.DepthComponent
getHeight, getWidth
 
Methods inherited from class javax.media.j3d.NodeComponent
getDuplicateOnCloneTree, setDuplicateOnCloneTree
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, duplicateSceneGraphObject, getCapability, getUserData, isCompiled, isLive, setCapability, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DepthComponentFloat

public DepthComponentFloat(int width,
                           int height)
Constructs a new floating-point 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

setDepthData

public void setDepthData(float[] depthData)
Copies the specified depth data to this object.
Parameters:
depthData - array of floats containing the depth data
Throws:
RestrictedAccessException - if the method is called when this object is part of live or compiled scene graph.

getDepthData

public void getDepthData(float[] depthData)
Copies the depth data from this object to the specified array.
Parameters:
depthData - array of floats that will receive a copy of the depth data
Throws:
CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph

cloneNodeComponent

public NodeComponent cloneNodeComponent()
Creates a new DepthComponentFloat object. Called from a Leaf node's duplicateNode method.
Overrides:
cloneNodeComponent in class NodeComponent
Returns:
a duplicate of the DepthComponentFloat object.
See Also:
Node.duplicateNode(javax.media.j3d.Node, boolean), Node.cloneTree(), NodeComponent.setDuplicateOnCloneTree(boolean)

duplicateNodeComponent

public void duplicateNodeComponent(NodeComponent originalNodeComponent)
Copies the information found in originalNodeComponent to the current node. This routine is called as part of the cloneNodeComponent operation.
Overrides:
duplicateNodeComponent in class NodeComponent
Parameters:
originalNodeComponent - the node to duplicate.
See Also:
Node.cloneTree(), Node.cloneNode(boolean), NodeComponent.cloneNodeComponent(), NodeComponent.setDuplicateOnCloneTree(boolean)