javax.media.j3d
Class Texture2D

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

public class Texture2D
extends Texture

Texture2D is a subclass of Texture class. It extends Texture class by adding a constructor and a mutator method for setting a 2D 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_FORMAT_READ, ALLOW_IMAGE_READ, ALLOW_IMAGE_WRITE, ALLOW_MIPMAP_MODE_READ, ALLOW_SIZE_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
Texture2D()
          Constructs a texture object using default values.
Texture2D(int mipmapMode, int format, int width, int height)
          Constructs an empty Texture2D object with specified mipmapMode format, width and height.
 
Method Summary
 NodeComponent cloneNodeComponent()
          Deprecated. replaced with cloneNodeComponent(boolean forceDuplicate)
 void duplicateNodeComponent(NodeComponent originalNodeComponent)
          Deprecated. replaced with duplicateNodeComponent( NodeComponent originalNodeComponent, boolean forceDuplicate)
 
Methods inherited from class javax.media.j3d.Texture
getBoundaryColor, getBoundaryModeS, getBoundaryModeT, getEnable, getFormat, getHeight, getImage, getImages, getMagFilter, getMinFilter, getMipMapMode, getWidth, numMipMapLevels, setBoundaryColor, setBoundaryColor, setBoundaryModeS, setBoundaryModeT, setEnable, setImage, setImages, setMagFilter, setMinFilter, setMipMapMode
 
Methods inherited from class javax.media.j3d.NodeComponent
cloneNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, duplicateSceneGraphObject, getCapability, getUserData, isCompiled, isLive, setCapability, setUserData, updateNodeReferences
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Texture2D

public Texture2D()
Constructs a texture object using default values. Note that the default constructor creates a texture object with a width and height of 0 and is, therefore, not useful.

Texture2D

public Texture2D(int mipmapMode,
                 int format,
                 int width,
                 int height)
Constructs an empty Texture2D object with specified mipmapMode format, width and height. 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.
Throws:
java.lang.IllegalArgumentException - if width or height are NOT power of 2 OR invalid format/mipmapMode is specified.
Method Detail

cloneNodeComponent

public NodeComponent cloneNodeComponent()
Deprecated. replaced with cloneNodeComponent(boolean forceDuplicate)

Overrides:
cloneNodeComponent in class NodeComponent

duplicateNodeComponent

public void duplicateNodeComponent(NodeComponent originalNodeComponent)
Deprecated. replaced with duplicateNodeComponent( NodeComponent originalNodeComponent, boolean forceDuplicate)

NOTE: Applications should not call this method directly. It should only be called by the cloneNode method.
Overrides:
duplicateNodeComponent in class NodeComponent