All Packages Class Hierarchy This Package Previous Next Index
Class javax.media.j3d.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.
-
Texture2D()
- Constructs a texture object using default values.
-
Texture2D(int, int, int, int)
- Constructs an empty Texture2D object with specified mipmapMode
format, width and height.
-
cloneNodeComponent()
- Creates a new Texture2D object.
-
duplicateNodeComponent(NodeComponent)
- Copies the information found in
originalNode
to
the current node.
Texture2D
public Texture2D()
- Constructs a texture object using default values.
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: IllegalArgumentException
- if width or height are NOT
power of 2 OR invalid format/mipmapMode is specified.
cloneNodeComponent
public NodeComponent cloneNodeComponent()
- Creates a new Texture2D object. Called from a Leaf
node's
duplicateNode
method.
- Returns:
- a duplicate of the Texture2D object.
- Overrides:
- cloneNodeComponent in class NodeComponent
- See Also:
- duplicateNode, cloneTree, setDuplicateOnCloneTree
duplicateNodeComponent
public void duplicateNodeComponent(NodeComponent originalNode)
- Copies the information found in
originalNode
to
the current node. This routine is called as part of the
cloneTree
operation.
- Parameters:
- originalNode - the node to duplicate.
- Overrides:
- duplicateNodeComponent in class NodeComponent
- See Also:
- cloneTree, duplicateNode, setDuplicateOnCloneTree
All Packages Class Hierarchy This Package Previous Next Index