|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.image.Texture
public abstract class 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,
magnificationFilter options, apply options and correction options. Default
values are as follows: minificationFilter - NearestNeighborNoMipMaps,
magnificationFilter - NearestNeighbor, wrap - EdgeClamp on S,T and R, apply -
Modulate, enivoronment - None.
Image
Nested Class Summary | |
---|---|
static class |
Texture.ApplyMode
|
static class |
Texture.CombinerFunctionAlpha
|
static class |
Texture.CombinerFunctionRGB
|
static class |
Texture.CombinerOperandAlpha
|
static class |
Texture.CombinerOperandRGB
|
static class |
Texture.CombinerScale
|
static class |
Texture.CombinerSource
|
static class |
Texture.DepthTextureCompareFunc
The shadowing texture compare function |
static class |
Texture.DepthTextureCompareMode
The shadowing texture compare mode |
static class |
Texture.DepthTextureMode
The type of depth texture translation to output |
static class |
Texture.EnvironmentalMapMode
|
static class |
Texture.MagnificationFilter
|
static class |
Texture.MinificationFilter
|
static class |
Texture.RenderToTextureType
When doing RenderToTexture operations with this texture, this value indicates what content to render into this texture. |
static class |
Texture.Type
|
static class |
Texture.WrapAxis
|
static class |
Texture.WrapMode
|
Field Summary | |
---|---|
static boolean |
DEFAULT_STORE_TEXTURE
|
Constructor Summary | |
---|---|
Texture()
Constructor instantiates a new Texture object with default
attributes. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean DEFAULT_STORE_TEXTURE
Constructor Detail |
---|
public Texture()
Texture
object with default
attributes.
Method Detail |
---|
public void setBlendColor(ColorRGBA color)
setBlendColor
sets a color that is used with
CombinerSource.Constant
color
- the new blend color - or null for the default (black)public void setBorderColor(ColorRGBA color)
setBorderColor
sets the color used when texture operations
encounter the border of a texture.
color
- the new border color - or null for the default (black)public Texture.MinificationFilter getMinificationFilter()
public void setMinificationFilter(Texture.MinificationFilter minificationFilter)
minificationFilter
- the new MinificationFilterMode for this texture.
java.lang.IllegalArgumentException
- if minificationFilter is nullpublic Texture.MagnificationFilter getMagnificationFilter()
public void setMagnificationFilter(Texture.MagnificationFilter magnificationFilter)
magnificationFilter
- the new MagnificationFilter for this texture.
java.lang.IllegalArgumentException
- if magnificationFilter is nullpublic void setApply(Texture.ApplyMode apply)
setApply
sets the apply mode for this texture.
apply
- the apply mode for this texture.
java.lang.IllegalArgumentException
- if apply is nullpublic void setImage(Image image)
setImage
sets the image object that defines the texture.
image
- the image that defines the 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 Texture.ApplyMode getApply()
getApply
returns the apply mode for the texture.
public ColorRGBA getBlendColor()
getBlendColor
returns the color set to be used with
CombinerSource.Constant for this texture (as applicable) If null, black
is assumed.
public ColorRGBA getBorderColor()
getBorderColor
returns the color to be used for border
operations. If null, black is assumed.
public abstract void setWrap(Texture.WrapAxis axis, Texture.WrapMode mode)
setWrap
sets the wrap mode of this texture for a
particular axis.
axis
- the texture axis to define a wrapmode on.mode
- the wrap mode for the given axis of the texture.
java.lang.IllegalArgumentException
- if axis or mode are null or invalid for this type of texturepublic abstract void setWrap(Texture.WrapMode mode)
setWrap
sets the wrap mode of this texture for all axis.
mode
- the wrap mode for the given axis of the texture.
java.lang.IllegalArgumentException
- if mode is null or invalid for this type of texturepublic abstract Texture.WrapMode getWrap(Texture.WrapAxis axis)
getWrap
returns the wrap mode for a given coordinate axis
on this texture.
axis
- the axis to return for
java.lang.IllegalArgumentException
- if axis is null or invalid for this type of texturepublic abstract Texture.Type getType()
public Texture.CombinerFunctionRGB getCombineFuncRGB()
public void setCombineFuncRGB(Texture.CombinerFunctionRGB combineFuncRGB)
combineFuncRGB
- The combineFuncRGB to set.
java.lang.IllegalArgumentException
- if combineFuncRGB is nullpublic Texture.CombinerOperandAlpha getCombineOp0Alpha()
public void setCombineOp0Alpha(Texture.CombinerOperandAlpha combineOp0Alpha)
combineOp0Alpha
- The combineOp0Alpha to set.
java.lang.IllegalArgumentException
- if combineOp0Alpha is nullpublic Texture.CombinerOperandRGB getCombineOp0RGB()
public void setCombineOp0RGB(Texture.CombinerOperandRGB combineOp0RGB)
combineOp0RGB
- The combineOp0RGB to set.
java.lang.IllegalArgumentException
- if combineOp0RGB is nullpublic Texture.CombinerOperandAlpha getCombineOp1Alpha()
public void setCombineOp1Alpha(Texture.CombinerOperandAlpha combineOp1Alpha)
combineOp1Alpha
- The combineOp1Alpha to set.
java.lang.IllegalArgumentException
- if combineOp1Alpha is nullpublic Texture.CombinerOperandRGB getCombineOp1RGB()
public void setCombineOp1RGB(Texture.CombinerOperandRGB combineOp1RGB)
combineOp1RGB
- The combineOp1RGB to set.
java.lang.IllegalArgumentException
- if combineOp1RGB is nullpublic Texture.CombinerOperandAlpha getCombineOp2Alpha()
public void setCombineOp2Alpha(Texture.CombinerOperandAlpha combineOp2Alpha)
combineOp2Alpha
- The combineOp2Alpha to set.
java.lang.IllegalArgumentException
- if combineOp2Alpha is nullpublic Texture.CombinerOperandRGB getCombineOp2RGB()
public void setCombineOp2RGB(Texture.CombinerOperandRGB combineOp2RGB)
combineOp2RGB
- The combineOp2RGB to set.
java.lang.IllegalArgumentException
- if combineOp2RGB is nullpublic Texture.CombinerScale getCombineScaleAlpha()
public void setCombineScaleAlpha(Texture.CombinerScale combineScaleAlpha)
combineScaleAlpha
- The combineScaleAlpha to set.
java.lang.IllegalArgumentException
- if combineScaleAlpha is nullpublic Texture.CombinerScale getCombineScaleRGB()
public void setCombineScaleRGB(Texture.CombinerScale combineScaleRGB)
combineScaleRGB
- The combineScaleRGB to set.
java.lang.IllegalArgumentException
- if combineScaleRGB is nullpublic Texture.CombinerSource getCombineSrc0Alpha()
public void setCombineSrc0Alpha(Texture.CombinerSource combineSrc0Alpha)
combineSrc0Alpha
- The combineSrc0Alpha to set.
java.lang.IllegalArgumentException
- if combineSrc0Alpha is nullpublic Texture.CombinerSource getCombineSrc0RGB()
public void setCombineSrc0RGB(Texture.CombinerSource combineSrc0RGB)
combineSrc0RGB
- The combineSrc0RGB to set.
java.lang.IllegalArgumentException
- if combineSrc0RGB is nullpublic Texture.CombinerSource getCombineSrc1Alpha()
public void setCombineSrc1Alpha(Texture.CombinerSource combineSrc1Alpha)
combineSrc1Alpha
- The combineSrc1Alpha to set.
java.lang.IllegalArgumentException
- if combineSrc1Alpha is nullpublic Texture.CombinerSource getCombineSrc1RGB()
public void setCombineSrc1RGB(Texture.CombinerSource combineSrc1RGB)
combineSrc1RGB
- The combineSrc1RGB to set.
java.lang.IllegalArgumentException
- if combineSrc1RGB is nullpublic Texture.CombinerSource getCombineSrc2Alpha()
public void setCombineSrc2Alpha(Texture.CombinerSource combineSrc2Alpha)
combineSrc2Alpha
- The combineSrc2Alpha to set.
java.lang.IllegalArgumentException
- if combineSrc2Alpha is nullpublic Texture.CombinerSource getCombineSrc2RGB()
public void setCombineSrc2RGB(Texture.CombinerSource combineSrc2RGB)
combineSrc2RGB
- The combineSrc2RGB to set.
java.lang.IllegalArgumentException
- if combineSrc2RGB is nullpublic Texture.CombinerFunctionAlpha getCombineFuncAlpha()
public void setCombineFuncAlpha(Texture.CombinerFunctionAlpha combineFuncAlpha)
combineFuncAlpha
- The combineFuncAlpha to set.
java.lang.IllegalArgumentException
- if combineFuncAlpha is nullpublic void setEnvironmentalMapMode(Texture.EnvironmentalMapMode envMapMode)
envMapMode
-
java.lang.IllegalArgumentException
- if envMapMode is nullpublic Texture.EnvironmentalMapMode getEnvironmentalMapMode()
public java.lang.String getImageLocation()
public void setImageLocation(java.lang.String imageLocation)
public float getAnisotropicFilterPercent()
public void setAnisotropicFilterPercent(float percent)
percent
- the anisotropic filtering level for this texture as a
percentage (0.0 - 1.0)public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public abstract Texture createSimpleClone()
public Texture createSimpleClone(Texture rVal)
public Quaternion getRotation()
public void setRotation(Quaternion rotation)
rotation
- The rotation to set.public Matrix4f getMatrix()
public void setMatrix(Matrix4f matrix)
matrix
- The matrix to set on this Texture. If null, rotation, scale
and/or translation will be used.public Vector3f getScale()
public void setScale(Vector3f scale)
scale
- The scale to set.public Vector3f getTranslation()
public void setTranslation(Vector3f translation)
translation
- The translation to set.public Texture.RenderToTextureType getRTTSource()
public void setRenderToTextureType(Texture.RenderToTextureType rttSource)
rttSource
- The rttSource to set.
java.lang.IllegalArgumentException
- if rttSource is nullpublic int getMemoryReq()
public void updateMemoryReq()
public void write(JMEExporter e) throws java.io.IOException
write
in interface Savable
java.io.IOException
public void read(JMEImporter e) throws java.io.IOException
read
in interface Savable
java.io.IOException
public java.lang.Class<? extends Texture> getClassTag()
getClassTag
in interface Savable
public void setTextureKey(TextureKey tkey)
public TextureKey getTextureKey()
public boolean isStoreTexture()
public void setStoreTexture(boolean storeTexture)
public boolean hasBorder()
public void setHasBorder(boolean hasBorder)
public Texture.DepthTextureCompareFunc getDepthCompareFunc()
public void setDepthCompareFunc(Texture.DepthTextureCompareFunc depthCompareFunc)
public Texture.DepthTextureMode getDepthMode()
public void setDepthMode(Texture.DepthTextureMode depthMode)
public Texture.DepthTextureCompareMode getDepthCompareMode()
public void setDepthCompareMode(Texture.DepthTextureCompareMode depthCompareMode)
depthCompareMode
- The depth texture compare mode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |