Package com.jme3.texture
Class Texture2D
java.lang.Object
com.jme3.texture.Texture
com.jme3.texture.Texture2D
- All Implemented Interfaces:
CloneableSmartAsset,Savable,Cloneable
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jme3.texture.Texture
Texture.MagFilter, Texture.MinFilter, Texture.ShadowCompareMode, Texture.Type, Texture.WrapAxis, Texture.WrapMode -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new two-dimensional texture with default attributes.Texture2D(int width, int height, int numSamples, Image.Format format) Creates a new two-dimensional texture for the purpose of offscreen rendering.Texture2D(int width, int height, Image.Format format) Creates a new two-dimensional texture for the purpose of offscreen rendering.Creates a new two-dimensional texture using the given image. -
Method Summary
Modifier and TypeMethodDescriptioncreateSimpleClone(Texture rVal) Retrieve a basic clone of this Texture (ie, clone everything but the image data, which is shared)booleangetType()getWrap(Texture.WrapAxis axis) getWrapreturns the wrap mode for a given coordinate axis on this texture.inthashCode()voidread(JmeImporter importer) voidsetWrap(Texture.WrapAxis axis, Texture.WrapMode mode) setWrapsets the wrap mode of this texture for a particular axis.voidsetWrap(Texture.WrapMode mode) setWrapsets the wrap mode of this texture for all axis.voidwrite(JmeExporter e) Methods inherited from class com.jme3.texture.Texture
clone, getAnisotropicFilter, getImage, getKey, getMagFilter, getMinFilter, getName, getShadowCompareMode, setAnisotropicFilter, setImage, setKey, setMagFilter, setMinFilter, setName, setShadowCompareMode, toString
-
Constructor Details
-
Texture2D
public Texture2D()Creates a new two-dimensional texture with default attributes. -
Texture2D
Creates a new two-dimensional texture using the given image.- Parameters:
img- The image to use.
-
Texture2D
Creates a new two-dimensional texture for the purpose of offscreen rendering.- Parameters:
width- the desired width (in pixels)height- the desired height (in pixels)format- the desired format- See Also:
-
Texture2D
Creates a new two-dimensional texture for the purpose of offscreen rendering.- Parameters:
width- the desired width (in pixels)height- the desired height (in pixels)numSamples- the desired degree of multi-sampling (≥1)format- the desired format- See Also:
-
-
Method Details
-
createSimpleClone
- Specified by:
createSimpleClonein classTexture- Returns:
- a new Texture
-
createSimpleClone
Description copied from class:TextureRetrieve a basic clone of this Texture (ie, clone everything but the image data, which is shared)- Overrides:
createSimpleClonein classTexture- Parameters:
rVal- storage for the clone (not null, modified)- Returns:
- Texture
-
setWrap
setWrapsets the wrap mode of this texture for a particular axis.- Specified by:
setWrapin classTexture- Parameters:
axis- the texture axis to apply the wrap mode to.mode- the wrap mode for the given axis of the texture.- Throws:
IllegalArgumentException- if axis or mode are null
-
setWrap
setWrapsets the wrap mode of this texture for all axis.- Specified by:
setWrapin classTexture- Parameters:
mode- the wrap mode for the given axis of the texture.- Throws:
IllegalArgumentException- if mode is null
-
getWrap
getWrapreturns the wrap mode for a given coordinate axis on this texture.- Specified by:
getWrapin classTexture- Parameters:
axis- the axis to return for- Returns:
- the wrap mode of the texture.
- Throws:
IllegalArgumentException- if axis is null
-
getType
-
equals
-
hashCode
public int hashCode() -
write
- Specified by:
writein interfaceSavable- Overrides:
writein classTexture- Throws:
IOException
-
read
- Specified by:
readin interfaceSavable- Overrides:
readin classTexture- Throws:
IOException
-