com.jme3.asset
Class TextureKey
java.lang.Object
com.jme3.asset.AssetKey<Texture>
com.jme3.asset.TextureKey
- All Implemented Interfaces:
- Savable, java.lang.Cloneable
- Direct Known Subclasses:
- GeneratedTextureKey
public class TextureKey
- extends AssetKey<Texture>
Used to load textures from image files such as JPG or PNG.
Note that texture loaders actually load the asset as an Image
object, which is then converted to a Texture
in the
TextureProcessor.postProcess(com.jme3.asset.AssetKey, java.lang.Object)
method. Since textures are cloneable smart assets, the texture stored
in the cache will be collected when all clones of the texture become
unreachable.
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
TextureKey
public TextureKey(java.lang.String name,
boolean flipY)
TextureKey
public TextureKey(java.lang.String name)
TextureKey
public TextureKey()
toString
public java.lang.String toString()
- Overrides:
toString
in class AssetKey<Texture>
getCacheType
public java.lang.Class<? extends AssetCache> getCacheType()
- Overrides:
getCacheType
in class AssetKey<Texture>
- Returns:
- The preferred cache class for this asset type. Specify "null"
if caching is to be disabled. By default the
SimpleAssetCache
is returned.
getProcessorType
public java.lang.Class<? extends AssetProcessor> getProcessorType()
- Overrides:
getProcessorType
in class AssetKey<Texture>
- Returns:
- The preferred processor type for this asset type. Specify "null"
if no processing is required.
isFlipY
public boolean isFlipY()
getAnisotropy
public int getAnisotropy()
setAnisotropy
public void setAnisotropy(int anisotropy)
isAsCube
public boolean isAsCube()
setAsCube
public void setAsCube(boolean asCube)
isGenerateMips
public boolean isGenerateMips()
setGenerateMips
public void setGenerateMips(boolean generateMips)
isAsTexture3D
public boolean isAsTexture3D()
setAsTexture3D
public void setAsTexture3D(boolean asTexture3D)
getTextureTypeHint
public Texture.Type getTextureTypeHint()
setTextureTypeHint
public void setTextureTypeHint(Texture.Type textureTypeHint)
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class AssetKey<Texture>
hashCode
public int hashCode()
- Overrides:
hashCode
in class AssetKey<Texture>
write
public void write(JmeExporter ex)
throws java.io.IOException
- Specified by:
write
in interface Savable
- Overrides:
write
in class AssetKey<Texture>
- Throws:
java.io.IOException
read
public void read(JmeImporter im)
throws java.io.IOException
- Specified by:
read
in interface Savable
- Overrides:
read
in class AssetKey<Texture>
- Throws:
java.io.IOException