|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.image.Texture
Texture defines a texture object to be used to display an
image on a piece of geometry. The image to be displayed is defined by the
Image class. All attributes required for texture mapping are
contained within this class. This includes mipmapping if desired, filter
options, apply options and correction options. Default values are as
follows: mipmap - MM_NONE, filter - FM_NEAREST, wrap - WM_CLAMP_S_CLAMP_T,
apply - AM_MODULATE, correction - CM_AFFINE.
Image| Field Summary | |
static int |
ACF_ADD
|
static int |
ACF_ADD_SIGNED
|
static int |
ACF_DOT3_RGB
|
static int |
ACF_DOT3_RGBA
|
static int |
ACF_INTERPOLATE
|
static int |
ACF_MODULATE
|
static int |
ACF_REPLACE
|
static int |
ACF_SUBTRACT
|
static int |
ACO_ONE_MINUS_SRC_ALPHA
|
static int |
ACO_ONE_MINUS_SRC_COLOR
|
static int |
ACO_SRC_ALPHA
|
static int |
ACO_SRC_COLOR
|
static int |
ACS_CONSTANT
|
static int |
ACS_PREVIOUS
|
static int |
ACS_PRIMARY_COLOR
|
static int |
ACS_TEXTURE
|
static int |
ACSC_FOUR
|
static int |
ACSC_ONE
|
static int |
ACSC_TWO
|
static int |
AM_BLEND
Apply modifier that combines the color of the pixel with the texture color, such that the final color value is Cv = (1 - Ct) Cf. |
static int |
AM_COMBINE
Apply modifier combines two textures. |
static int |
AM_DECAL
Apply modifier that replaces the color values of the pixel but makes use of the alpha values. |
static int |
AM_MODULATE
Apply modifier multiples the color of the pixel with the texture color. |
static int |
AM_REPLACE
Apply modifier that replaces the previous pixel color with the texture color. |
static int |
CM_AFFINE
Correction modifier makes no color corrections, and is the fastest. |
static int |
CM_PERSPECTIVE
Correction modifier makes color corrections based on perspective and is slower than CM_AFFINE. |
static int |
EM_IGNORE
|
static int |
EM_NONE
|
static int |
EM_SPHERE
|
static int |
FM_LINEAR
Filter option to return the weighted average of the four texture elements that are closest to the center of the pixel being textured. |
static int |
FM_NEAREST
Filter option to return the value of the texture element that is nearest to the center of the pixel being textured. |
static int |
MM_LINEAR
Mipmap option to return the weighted average of the four texture elements that are closest to the center of the pixel being textured. |
static int |
MM_LINEAR_LINEAR
Mipmap option that picks the two mipmaps that most closely match the size of the pixel being textured and uses MM_LINEAR criteria. |
static int |
MM_LINEAR_NEAREST
Mipmap option that picks the two mipmaps that most closely match the size of the pixel being textured and uses MM_NEAREST criteria. |
static int |
MM_NEAREST
Mipmap option to return the value of the texture element that is nearest to the center of the pixel being textured. |
static int |
MM_NEAREST_LINEAR
Mipmap option that picks the mipmap most closely matches the size of the pixel being textured and uses MM_LINEAR criteria. |
static int |
MM_NEAREST_NEAREST
Mipmap option that picks the mipmap that most closely matches the size of the pixel being textured and uses MM_NEAREST criteria. |
static int |
MM_NONE
Mipmap option for no mipmap. |
static int |
WM_BCLAMP_S_BCLAMP_T
Wrapping modifier that clamps both the S and T values of the texture. |
static int |
WM_CLAMP_S_CLAMP_T
Wrapping modifier that clamps both the S and T values of the texture. |
static int |
WM_CLAMP_S_WRAP_T
Wrapping modifier that clamps the S value but wraps the T value of the texture. |
static int |
WM_ECLAMP_S_ECLAMP_T
Wrapping modifier that clamps both the S and T values of the texture. |
static int |
WM_WRAP_S_CLAMP_T
Wrapping modifier that wraps the S value but clamps the T value of the texture. |
static int |
WM_WRAP_S_WRAP_T
Wrapping modifier that wraps both the S and T values of the texture. |
| Constructor Summary | |
Texture()
Constructor instantiates a new Texture object with
default attributes. |
|
Texture(float aniso)
Constructor instantiates a new Texture object with
given attributes. |
|
| Method Summary | |
Texture |
createSimpleClone()
Retreive a basic clone of this Texture (ie, clone everything but the image data, which is shared) |
boolean |
equals(java.lang.Object other)
|
float |
getAnisoLevel()
|
int |
getApply()
getApply returns the apply mode for the texture. |
java.nio.FloatBuffer |
getBlendColor()
getBlendColor returns the buffer that contains the
texture's tint color. |
java.nio.FloatBuffer |
getBlendColorBuffer()
getBlendColorBuffer returns the buffer that contains
the color values that are used to tint the texture. |
int |
getCombineFuncAlpha()
|
int |
getCombineFuncRGB()
|
int |
getCombineOp0Alpha()
|
int |
getCombineOp0RGB()
|
int |
getCombineOp1Alpha()
|
int |
getCombineOp1RGB()
|
int |
getCombineOp2Alpha()
|
int |
getCombineOp2RGB()
|
float |
getCombineScaleAlpha()
|
float |
getCombineScaleRGB()
|
int |
getCombineSrc0Alpha()
|
int |
getCombineSrc0RGB()
|
int |
getCombineSrc1Alpha()
|
int |
getCombineSrc1RGB()
|
int |
getCombineSrc2Alpha()
|
int |
getCombineSrc2RGB()
|
int |
getCorrection()
getCorrection returns the correction mode for the
texture. |
int |
getEnvironmentalMapMode()
|
int |
getFilter()
getFilter returns the filter mode for the texture. |
Image |
getImage()
getImage returns the image data that makes up this texture. |
java.lang.String |
getImageLocation()
|
int |
getMipmap()
getMipmap returns the mipmap mode for the texture. |
int |
getMipmapState()
getMipmapState returns the current mipmap state of this
texture. |
int |
getTextureId()
getTextureId returns the texture id of this texture. |
int |
getWrap()
getWrap returns the wrap mode for the texture. |
boolean |
needsFilterRefresh()
|
boolean |
needsWrapRefresh()
|
void |
setAnisoLevel(float level)
Deprecated. Must set aniso level when loading texture from manager. |
void |
setApply(int apply)
setApply sets the apply mode for this texture. |
void |
setBlendColor(ColorRGBA color)
setBlendColor sets the color to be used to tint the
texture. |
void |
setBlendColorBuffer(java.nio.FloatBuffer blendColorBuffer)
setBlendColorBuffer sets the buffer that contains the
color values that are used to tint the texture. |
void |
setCombineFuncAlpha(int combineFuncAlpha)
|
void |
setCombineFuncRGB(int combineFuncRGB)
|
void |
setCombineOp0Alpha(int combineOp0Alpha)
|
void |
setCombineOp0RGB(int combineOp0RGB)
|
void |
setCombineOp1Alpha(int combineOp1Alpha)
|
void |
setCombineOp1RGB(int combineOp1RGB)
|
void |
setCombineOp2Alpha(int combineOp2Alpha)
|
void |
setCombineOp2RGB(int combineOp2RGB)
|
void |
setCombineScaleAlpha(float combineScaleAlpha)
|
void |
setCombineScaleRGB(float combineScaleRGB)
|
void |
setCombineSrc0Alpha(int combineSrc0Alpha)
|
void |
setCombineSrc0RGB(int combineSrc0RGB)
|
void |
setCombineSrc1Alpha(int combineSrc1Alpha)
|
void |
setCombineSrc1RGB(int combineSrc1RGB)
|
void |
setCombineSrc2Alpha(int combineSrc2Alpha)
|
void |
setCombineSrc2RGB(int combineSrc2RGB)
|
void |
setCorrection(int correction)
setCorrection sets the image correction mode for this
texture. |
void |
setEnvironmentalMapMode(int envMapMode)
|
void |
setFilter(int filter)
setFilter sets the texture filter mode for this
texture. |
void |
setImage(Image image)
setImage sets the image object that defines the texture. |
void |
setImageLocation(java.lang.String imageLocation)
|
void |
setMipmapState(int mipmapState)
setMipmapState sets the mipmap state for this texture. |
void |
setNeedsFilterRefresh(boolean needed)
|
void |
setNeedsWrapRefresh(boolean needed)
|
void |
setTextureId(int textureId)
setTextureId sets the texture id for this
texture. |
void |
setWrap(int wrap)
setWrap sets the wrap mode of this texture. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int MM_NONE
public static final int MM_NEAREST
public static final int MM_LINEAR
public static final int MM_NEAREST_NEAREST
public static final int MM_NEAREST_LINEAR
public static final int MM_LINEAR_NEAREST
public static final int MM_LINEAR_LINEAR
public static final int FM_NEAREST
public static final int FM_LINEAR
public static final int WM_CLAMP_S_CLAMP_T
public static final int WM_CLAMP_S_WRAP_T
public static final int WM_WRAP_S_CLAMP_T
public static final int WM_WRAP_S_WRAP_T
public static final int WM_ECLAMP_S_ECLAMP_T
public static final int WM_BCLAMP_S_BCLAMP_T
public static final int AM_REPLACE
public static final int AM_DECAL
public static final int AM_MODULATE
public static final int AM_BLEND
public static final int AM_COMBINE
public static final int CM_AFFINE
public static final int CM_PERSPECTIVE
public static final int ACF_REPLACE
public static final int ACF_MODULATE
public static final int ACF_ADD
public static final int ACF_ADD_SIGNED
public static final int ACF_SUBTRACT
public static final int ACF_INTERPOLATE
public static final int ACF_DOT3_RGB
public static final int ACF_DOT3_RGBA
public static final int ACS_TEXTURE
public static final int ACS_PRIMARY_COLOR
public static final int ACS_CONSTANT
public static final int ACS_PREVIOUS
public static final int ACO_SRC_COLOR
public static final int ACO_ONE_MINUS_SRC_COLOR
public static final int ACO_SRC_ALPHA
public static final int ACO_ONE_MINUS_SRC_ALPHA
public static final int ACSC_ONE
public static final int ACSC_TWO
public static final int ACSC_FOUR
public static final int EM_NONE
public static final int EM_IGNORE
public static final int EM_SPHERE
| Constructor Detail |
public Texture()
Texture object with
default attributes.
public Texture(float aniso)
Texture object with
given attributes.
| Method Detail |
public java.nio.FloatBuffer getBlendColorBuffer()
getBlendColorBuffer returns the buffer that contains
the color values that are used to tint the texture.
public void setBlendColorBuffer(java.nio.FloatBuffer blendColorBuffer)
setBlendColorBuffer sets the buffer that contains the
color values that are used to tint the texture.
blendColorBuffer - the buffer that contains the texture tint color.public void setBlendColor(ColorRGBA color)
setBlendColor sets the color to be used to tint the
texture. This color is used to create the new blend color buffer.
color - the color of the texture tint.public int getMipmapState()
getMipmapState returns the current mipmap state of this
texture.
public void setMipmapState(int mipmapState)
setMipmapState sets the mipmap state for this texture.
If the state is invalid it is set to MM_NONE.
mipmapState - the new mipmap state.public void setApply(int apply)
setApply sets the apply mode for this texture. If an
invalid value is passed, it is set to AM_MODULATE;
apply - the apply mode for this texture.public void setCorrection(int correction)
setCorrection sets the image correction mode for this
texture. If an invalid value is passed, it is set to CM_AFFINE.
correction - the correction mode for this texture.public void setFilter(int filter)
setFilter sets the texture filter mode for this
texture. If an invalid value is passed, it is set to FM_NEAREST.
filter - the filter mode for this texture.public void setImage(Image image)
setImage sets the image object that defines the texture.
image - the image that defines the texture.public void setWrap(int wrap)
setWrap sets the wrap mode of this texture. If an invalid
value is passed, it is set to WM_ECLAMP_S_ECLAMP_T.
wrap - the wrap mode for this texture.public int getTextureId()
getTextureId returns the texture id of this texture. This
id is required to be unique to any other texture objects running in the
same JVM. However, no guarantees are made that it will be unique, and as
such, the user is responsible for this.
public void setTextureId(int textureId)
setTextureId sets the texture id for this
texture. Zero means no id is set.
textureId - the texture id of this texture.public Image getImage()
getImage returns the image data that makes up this texture.
If no image data has been set, this will return null.
public int getMipmap()
getMipmap returns the mipmap mode for the texture.
public int getCorrection()
getCorrection returns the correction mode for the
texture.
public int getApply()
getApply returns the apply mode for the texture.
public java.nio.FloatBuffer getBlendColor()
getBlendColor returns the buffer that contains the
texture's tint color.
public int getWrap()
getWrap returns the wrap mode for the texture.
public int getFilter()
getFilter returns the filter mode for the texture.
public int getCombineFuncRGB()
public void setCombineFuncRGB(int combineFuncRGB)
combineFuncRGB - The combineFuncRGB to set.public int getCombineOp0Alpha()
public void setCombineOp0Alpha(int combineOp0Alpha)
combineOp0Alpha - The combineOp0Alpha to set.public int getCombineOp0RGB()
public void setCombineOp0RGB(int combineOp0RGB)
combineOp0RGB - The combineOp0RGB to set.public int getCombineOp1Alpha()
public void setCombineOp1Alpha(int combineOp1Alpha)
combineOp1Alpha - The combineOp1Alpha to set.public int getCombineOp1RGB()
public void setCombineOp1RGB(int combineOp1RGB)
combineOp1RGB - The combineOp1RGB to set.public int getCombineOp2Alpha()
public void setCombineOp2Alpha(int combineOp2Alpha)
combineOp2Alpha - The combineOp2Alpha to set.public int getCombineOp2RGB()
public void setCombineOp2RGB(int combineOp2RGB)
combineOp2RGB - The combineOp2RGB to set.public float getCombineScaleAlpha()
public void setCombineScaleAlpha(float combineScaleAlpha)
combineScaleAlpha - The combineScaleAlpha to set.public float getCombineScaleRGB()
public void setCombineScaleRGB(float combineScaleRGB)
combineScaleRGB - The combineScaleRGB to set.public int getCombineSrc0Alpha()
public void setCombineSrc0Alpha(int combineSrc0Alpha)
combineSrc0Alpha - The combineSrc0Alpha to set.public int getCombineSrc0RGB()
public void setCombineSrc0RGB(int combineSrc0RGB)
combineSrc0RGB - The combineSrc0RGB to set.public int getCombineSrc1Alpha()
public void setCombineSrc1Alpha(int combineSrc1Alpha)
combineSrc1Alpha - The combineSrc1Alpha to set.public int getCombineSrc1RGB()
public void setCombineSrc1RGB(int combineSrc1RGB)
combineSrc1RGB - The combineSrc1RGB to set.public int getCombineSrc2Alpha()
public void setCombineSrc2Alpha(int combineSrc2Alpha)
combineSrc2Alpha - The combineSrc2Alpha to set.public int getCombineSrc2RGB()
public void setCombineSrc2RGB(int combineSrc2RGB)
combineSrc2RGB - The combineSrc2RGB to set.public int getCombineFuncAlpha()
public void setCombineFuncAlpha(int combineFuncAlpha)
combineFuncAlpha - The combineFuncAlpha to set.public void setEnvironmentalMapMode(int envMapMode)
public int getEnvironmentalMapMode()
public java.lang.String toString()
public java.lang.String getImageLocation()
public void setImageLocation(java.lang.String imageLocation)
public float getAnisoLevel()
public void setAnisoLevel(float level)
level - floatpublic void setNeedsFilterRefresh(boolean needed)
public boolean needsFilterRefresh()
public void setNeedsWrapRefresh(boolean needed)
public boolean needsWrapRefresh()
public boolean equals(java.lang.Object other)
public Texture createSimpleClone()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||