| java.lang.Object javax.media.j3d.SceneGraphObject javax.media.j3d.NodeComponent javax.media.j3d.Texture javax.media.j3d.Texture2D
Texture2D | public class Texture2D extends Texture (Code) | | 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.
Note that as of Java 3D 1.5, the texture width and height are no longer
required to be an exact power of two. However, not all graphics devices
supports non-power-of-two textures. If non-power-of-two texture mapping is
unsupported on a particular Canvas3D, textures with a width or height that
are not an exact power of two are ignored for that canvas.
See Also: Canvas3D.queryProperties |
Constructor Summary | |
public | Texture2D() Constructs a texture object using default values. | public | Texture2D(int mipMapMode, int format, int width, int height) Constructs an empty Texture2D object with specified mipmapMode
format, width and height. | public | Texture2D(int mipMapMode, int format, int width, int height, int boundaryWidth) Constructs an empty Texture2D object with specified mipMapMode,
format, width, height, and boundaryWidth.
Defaults are used for all other
parameters. |
ALLOW_DETAIL_TEXTURE_READ | final public static int ALLOW_DETAIL_TEXTURE_READ(Code) | | since: Java 3D 1.3 |
Texture2D | public Texture2D()(Code) | | Constructs a texture object using default values.
The default values are as follows:
detail texture image: null
detail texture mode: DETAIL_MODULATE
detail texture func: null
detail texture level: 2
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)(Code) | | Constructs an empty Texture2D object with specified mipmapMode
format, width and height. Image at base level must be set by
the application using 'setImage' method. If mipmapMode is
set to MULTI_LEVEL_MIPMAP, images for base level through maximum level
must be set.
Note that a texture with a non-power-of-two width or height will
only be rendered on a graphics device that supports non-power-of-two
textures.
Parameters: mipMapMode - type of mipmap for this Texture: One ofBASE_LEVEL, MULTI_LEVEL_MIPMAP. Parameters: format - data format of Textures saved in this object.One of INTENSITY, LUMINANCE, ALPHA, LUMINANCE_ALPHA, RGB, RGBA. Parameters: width - width of image at level 0. Parameters: height - height of image at level 0. exception: IllegalArgumentException - if width or height are NOTgreater than 0 OR invalid format/mipmapMode is specified. |
Texture2D | public Texture2D(int mipMapMode, int format, int width, int height, int boundaryWidth)(Code) | | Constructs an empty Texture2D object with specified mipMapMode,
format, width, height, and boundaryWidth.
Defaults are used for all other
parameters. If mipMapMode is set to
BASE_LEVEL , then the image at level 0 must be set
by the application (using either the setImage or
setImages method). If mipMapMode is
set to MULTI_LEVEL_MIPMAP , then images for levels
Base Level through Maximum Level must be set.
Note that a texture with a non-power-of-two width or height will
only be rendered on a graphics device that supports non-power-of-two
textures.
Parameters: mipMapMode - type of mipmap for this Texture: one ofBASE_LEVEL, MULTI_LEVEL_MIPMAP Parameters: format - data format of Textures saved in this object.One of INTENSITY, LUMINANCE, ALPHA, LUMINANCE_ALPHA, RGB, RGBA Parameters: width - width of image at level 0. Thisdoes not include the width of the boundary. Parameters: height - height of image at level 0. Thisdoes not include the width of the boundary. Parameters: boundaryWidth - width of the boundary, which must be 0 or 1. exception: IllegalArgumentException - if width or height are not greaterthan 0, if an invalid format or mipMapMode is specified, orif the boundaryWidth is < 0 or > 1 since: Java 3D 1.3 |
createRetained | void createRetained()(Code) | | Creates a retained mode Texture2DRetained object that this
Texture2D component object will point to.
|
duplicateAttributes | void duplicateAttributes(NodeComponent originalNodeComponent, boolean forceDuplicate)(Code) | | 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).
Parameters: originalNodeComponent - the original node to duplicate. Parameters: forceDuplicate - when set to true , causes theduplicateOnCloneTree flag to be ignored. Whenfalse , the value of each node'sduplicateOnCloneTree variable determines whetherNodeComponent data is duplicated or copied. See Also: Node.cloneTree See Also: NodeComponent.setDuplicateOnCloneTree |
duplicateNodeComponent | public void duplicateNodeComponent(NodeComponent originalNodeComponent)(Code) | | NOTE: Applications should not call this method directly.
It should only be called by the cloneNode method.
|
getDetailImage | public ImageComponent2D getDetailImage()(Code) | | ImageComponent2D object containing the detail texture image. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph since: Java 3D 1.3 |
getDetailTextureFunc | public void getDetailTextureFunc(float[] lod, float[] pts)(Code) | | Parameters: lod - the array to receive the level-of-detail values. Parameters: pts - the array to receive the function values for thecorresponding level-of-detail values. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph since: Java 3D 1.3 |
getDetailTextureFunc | public void getDetailTextureFunc(Point2f[] pts)(Code) | | Parameters: pts - the array to receive the detail texture LOD function points exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph since: Java 3D 1.3 |
getDetailTextureFuncPointsCount | public int getDetailTextureFuncPointsCount()(Code) | | the number of points in the detail texture LOD function. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph since: Java 3D 1.3 |
getDetailTextureLevel | public int getDetailTextureLevel()(Code) | | the detail texture level. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph since: Java 3D 1.3 |
getDetailTextureMode | public int getDetailTextureMode()(Code) | | the detail texture mode. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph since: Java 3D 1.3 |
setDetailTextureFunc | public void setDetailTextureFunc(float[] lod, float[] pts)(Code) | | Parameters: lod - array containing the level-of-detail values. Parameters: pts - array containing the function values for the correspondinglevel-of-detail values. exception: IllegalStateException - if the length of lod does not match the length of pts exception: RestrictedAccessException - if the method is calledwhen this object is part of live or compiled scene graph. since: Java 3D 1.3 See Also: Canvas3D.queryProperties |
setDetailTextureFunc | public void setDetailTextureFunc(Point2f[] pts)(Code) | | Parameters: pts - array of Point2f containing the lod as well as thecorresponding function value. exception: RestrictedAccessException - if the method is calledwhen this object is part of live or compiled scene graph. since: Java 3D 1.3 See Also: Canvas3D.queryProperties |
setDetailTextureMode | public void setDetailTextureMode(int mode)(Code) | | Parameters: mode - detail texture mode. One of: DETAIL_ADD or DETAIL_MODULATE exception: IllegalArgumentException - ifmode is a value other thanDETAIL_ADD , or DETAIL_MODULATE exception: RestrictedAccessException - if the method is calledwhen this object is part of live or compiled scene graph. since: Java 3D 1.3 See Also: Canvas3D.queryProperties |
setMagFilter | public void setMagFilter(int magFilter)(Code) | | Sets the magnification filter function. This
function is used when the pixel being rendered maps to an area
less than or equal to one texel.
Parameters: magFilter - the magnification filter, one of:FASTEST, NICEST, BASE_LEVEL_POINT, BASE_LEVEL_LINEAR, LINEAR_DETAIL, LINEAR_DETAIL_RGB, LINEAR_DETAIL_ALPHA,LINEAR_SHARPEN, LINEAR_SHARPEN_RGB, LINEAR_SHARPEN_ALPHA, or FILTER4. exception: RestrictedAccessException - if the method is calledwhen this object is part of live or compiled scene graph. exception: IllegalArgumentException - if minFilter is a value other than FASTEST , NICEST ,BASE_LEVEL_POINT , BASE_LEVEL_LINEAR ,LINEAR_DETAIL , LINEAR_DETAIL_RGB , LINEAR_DETAIL_ALPHA , LINEAR_SHARPEN , LINEAR_SHARPEN_RGB , LINEAR_SHARPEN_ALPHA , orFILTER4 . See Also: Canvas3D.queryProperties since: Java 3D 1.3 |
Fields inherited from javax.media.j3d.NodeComponent | boolean forceDuplicate(Code)(Java Doc)
|
|
|