javax.media.j3d
Class Texture3D

java.lang.Object
  |
  +--javax.media.j3d.SceneGraphObject
        |
        +--javax.media.j3d.NodeComponent
              |
              +--javax.media.j3d.Texture
                    |
                    +--javax.media.j3d.Texture3D

public class Texture3D
extends Texture

Texture3D is a subclass of Texture class. It extends Texture class by adding a third coordinate, constructor and a mutator method for setting a 3D texture image.


Fields inherited from class javax.media.j3d.Texture
ALLOW_BOUNDARY_COLOR_READ, ALLOW_BOUNDARY_MODE_READ, ALLOW_ENABLE_READ, ALLOW_ENABLE_WRITE, ALLOW_FILTER_READ, ALLOW_IMAGE_READ, ALLOW_MIPMAP_MODE_READ, ALPHA, BASE_LEVEL, BASE_LEVEL_LINEAR, BASE_LEVEL_POINT, CLAMP, FASTEST, INTENSITY, LUMINANCE, LUMINANCE_ALPHA, MULTI_LEVEL_LINEAR, MULTI_LEVEL_MIPMAP, MULTI_LEVEL_POINT, NICEST, RGB, RGBA, WRAP
 
Constructor Summary
Texture3D()
          Constructs a Texture3D object with default parameters.
Texture3D(int mipmapMode, int format, int width, int height, int depth)
          Constructs an empty Texture3D object with specified mipmapMode format, width, height, and depth.
 
Method Summary
 NodeComponent cloneNodeComponent()
          Creates a new Texture3D object.
 void duplicateNodeComponent(NodeComponent originalNodeComponent)
          Copies the information found in originalNodeComponent to the current node.
 int getBoundaryModeR()
          Retrieves the boundary mode for the R coordinate.
 void setBoundaryModeR(int boundaryModeR)
          Sets the boundary mode for the R coordinate in this texture object.
 
Methods inherited from class javax.media.j3d.Texture
getBoundaryColor, getBoundaryModeS, getBoundaryModeT, getEnable, getImage, getMagFilter, getMinFilter, getMipMapMode, setBoundaryColor, setBoundaryColor, setBoundaryModeS, setBoundaryModeT, setEnable, setImage, setMagFilter, setMinFilter, setMipMapMode
 
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

Texture3D

public Texture3D()
Constructs a Texture3D object with default parameters. The default values are as follows:

Note that the default constructor creates a texture object with a width, height, and depth of 0 and is, therefore, not useful.


Texture3D

public Texture3D(int mipmapMode,
                 int format,
                 int width,
                 int height,
                 int depth)
Constructs an empty Texture3D object with specified mipmapMode format, width, height, and depth. Image at level 0 must be set by the application using 'setImage' method. If mipmapMode is set to MULTI_LEVEL_MIPMAP, images for ALL levels must be set.
Parameters:
mipmapMode - type of mipmap for this Texture: One of BASE_LEVEL, MULTI_LEVEL_MIPMAP.
format - data format of Textures saved in this object. One of INTENSITY, LUMINANCE, ALPHA, LUMINANCE_ALPHA, RGB, RGBA.
width - width of image at level 0. Must be power of 2.
height - height of image at level 0. Must be power of 2.
depth - depth of image at level 0. Must be power of 2.
Throws:
java.lang.IllegalArgumentException - if width or height or depth are NOT power of 2 OR invalid format/mipmapMode is specified.
Method Detail

setBoundaryModeR

public final void setBoundaryModeR(int boundaryModeR)
Sets the boundary mode for the R coordinate in this texture object.
Parameters:
boundaryModeR - the boundary mode for the R coordinate, one of: CLAMP or WRAP.
Throws:
RestrictedAccessException - if the method is called when this object is part of live or compiled scene graph.

getBoundaryModeR

public final int getBoundaryModeR()
Retrieves the boundary mode for the R coordinate.
Returns:
the current boundary mode for the R coordinate.
Throws:
RestrictedAccessException - if the method is called when this object is part of live or compiled scene graph.

cloneNodeComponent

public NodeComponent cloneNodeComponent()
Creates a new Texture3D object. Called from a Leaf node's duplicateNode method.
Overrides:
cloneNodeComponent in class NodeComponent
Returns:
a duplicate of the Texture3D 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 cloneTree operation.
Overrides:
duplicateNodeComponent in class NodeComponent
Parameters:
originalNodeComponent - the node to duplicate.
See Also:
Node.cloneTree(), Node.duplicateNode(javax.media.j3d.Node, boolean), NodeComponent.setDuplicateOnCloneTree(boolean)