|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.j3d.SceneGraphObject | +--javax.media.j3d.NodeComponent | +--javax.media.j3d.Texture
The Texture object is a component object of an Appearance object that defines the texture properties used when texture mapping is enabled. Texture object is an abstract class and all texture objects must be created as either a Texture2D object or a Texture3D object.
Field Summary | |
static int |
ALLOW_BOUNDARY_COLOR_READ
Specifies that this Texture object allows reading its boundary color information. |
static int |
ALLOW_BOUNDARY_MODE_READ
Specifies that this Texture object allows reading its boundary mode information. |
static int |
ALLOW_ENABLE_READ
Specifies that this Texture object allows reading its enable flag. |
static int |
ALLOW_ENABLE_WRITE
Specifies that this Texture object allows writing its enable flag. |
static int |
ALLOW_FILTER_READ
Specifies that this Texture object allows reading its filter information. |
static int |
ALLOW_IMAGE_READ
Specifies that this Texture object allows reading its image component information. |
static int |
ALLOW_MIPMAP_MODE_READ
Specifies that this Texture object allows reading its mipmap mode information. |
static int |
ALPHA
Specifies Texture contains only Alpha values. |
static int |
BASE_LEVEL
Indicates that Texture object only has one level. |
static int |
BASE_LEVEL_LINEAR
Performs bilinear interpolation on the four nearest texels in level 0 texture map. |
static int |
BASE_LEVEL_POINT
Select the nearest texel in level 0 texture map. |
static int |
CLAMP
Clamps texture coordinates to be in the range [0, 1]. |
static int |
FASTEST
Uses the fastest available method for processing geometry. |
static int |
INTENSITY
Specifies Texture contains only Intensity values. |
static int |
LUMINANCE
Specifies Texture contains only luminance values. |
static int |
LUMINANCE_ALPHA
Specifies Texture contains Luminance and Alpha values. |
static int |
MULTI_LEVEL_LINEAR
Performs tri-linear interpolation of texels between four texels each from two nearest mipmap levels. |
static int |
MULTI_LEVEL_MIPMAP
Indicates that this Texture object has multiple images- one for each mipmap level(i.e. |
static int |
MULTI_LEVEL_POINT
Selects the nearest texel in the nearest mipmap. |
static int |
NICEST
Uses the nicest available method for processing geometry. |
static int |
RGB
Specifies Texture contains Red, Green and Blue color values. |
static int |
RGBA
Specifies Texture contains Red, Green, Blue color values and Alpha value. |
static int |
WRAP
Repeats the texture by wrapping texture coordinates that are outside the range [0,1]. |
Constructor Summary | |
Texture()
Constructs a Texture object with default parameters. |
|
Texture(int mipmapMode,
int format,
int width,
int height)
Constructs an empty Texture object with specified mipmapMode format, width and height. |
Method Summary | |
void |
getBoundaryColor(Color4f boundaryColor)
Retrieves the texture boundary color for this texture object. |
int |
getBoundaryModeS()
Retrieves the boundary mode for the S coordinate. |
int |
getBoundaryModeT()
Retrieves the boundary mode for the T coordinate. |
boolean |
getEnable()
Retrieves the state of the texture enable flag. |
ImageComponent |
getImage(int level)
Gets a specified mipmap level. |
int |
getMagFilter()
Retrieves the magnification filter. |
int |
getMinFilter()
Retrieves the minification filter. |
int |
getMipMapMode()
Retrieves current mipmap mode. |
void |
setBoundaryColor(Color4f boundaryColor)
Sets the texture boundary color for this texture object. |
void |
setBoundaryColor(float r,
float g,
float b,
float a)
Sets the texture boundary color for this texture object. |
void |
setBoundaryModeS(int boundaryModeS)
Sets the boundary mode for the S coordinate in this texture object. |
void |
setBoundaryModeT(int boundaryModeT)
Sets the boundary mode for the T coordinate in this texture object. |
void |
setEnable(boolean state)
Enables or disables texture mapping for this appearance component object. |
void |
setImage(int level,
ImageComponent image)
Sets a specified mipmap level. |
void |
setMagFilter(int magFilter)
Sets the magnification filter function. |
void |
setMinFilter(int minFilter)
Sets the minification filter function. |
void |
setMipMapMode(int mipmapMode)
Sets mipmap mode for texture mapping for this texture object. |
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 |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int ALLOW_ENABLE_READ
public static final int ALLOW_ENABLE_WRITE
public static final int ALLOW_BOUNDARY_MODE_READ
public static final int ALLOW_FILTER_READ
public static final int ALLOW_IMAGE_READ
public static final int ALLOW_MIPMAP_MODE_READ
public static final int ALLOW_BOUNDARY_COLOR_READ
public static final int FASTEST
public static final int NICEST
public static final int BASE_LEVEL_POINT
public static final int BASE_LEVEL_LINEAR
public static final int MULTI_LEVEL_POINT
public static final int MULTI_LEVEL_LINEAR
public static final int CLAMP
public static final int WRAP
public static final int BASE_LEVEL
public static final int MULTI_LEVEL_MIPMAP
public static final int INTENSITY
public static final int LUMINANCE
public static final int ALPHA
public static final int LUMINANCE_ALPHA
public static final int RGB
public static final int RGBA
Constructor Detail |
public Texture()
Note that the default constructor creates a texture object with a width and height of 0 and is, therefore, not useful.
public Texture(int mipmapMode, int format, int width, int height)
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.Method Detail |
public final void setBoundaryModeS(int boundaryModeS)
boundaryModeS
- the boundary mode for the S coordinate,
one of: CLAMP or WRAP.public final int getBoundaryModeS()
public final void setBoundaryModeT(int boundaryModeT)
boundaryModeT
- the boundary mode for the T coordinate,
one of: CLAMP or WRAP.public final int getBoundaryModeT()
public final void setMinFilter(int minFilter)
minFilter
- the minification filter, one of:
FASTEST, NICEST, BASE_LEVEL_POINT, BASE_LEVEL_LINEAR,
MULTI_LEVEL_POINT, MULTI_LEVEL_LINEAR.public final int getMinFilter()
public final void setMagFilter(int magFilter)
magFilter
- the magnification filter, one of:
FASTEST, NICEST, BASE_LEVEL_POINT, or BASE_LEVEL_LINEAR.public final int getMagFilter()
public final void setImage(int level, ImageComponent image)
level
- mipmap level to set: 0 is the base levelimage
- pixel array object containing the texture imagepublic final ImageComponent getImage(int level)
level
- mipmap level to get: 0 is the base levelpublic final void setMipMapMode(int mipmapMode)
mipMapMode
- the new mipmap mode for this object. One of:
BASE_LEVEL or MULTI_LEVEL_MIPMAP.public final int getMipMapMode()
public final void setEnable(boolean state)
state
- true or false to enable or disable texture mappingpublic final boolean getEnable()
public final void setBoundaryColor(Color4f boundaryColor)
boundaryColor
- the new texture boundary color.public final void setBoundaryColor(float r, float g, float b, float a)
r
- the red component of the color.g
- the green component of the color.b
- the blue component of the color.a
- the alpha component of the color.public final void getBoundaryColor(Color4f boundaryColor)
boundaryColor
- the vector that will receive the
current texture boundary color.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |