com.jme3.asset
Class TextureKey

java.lang.Object
  extended by com.jme3.asset.AssetKey<Texture>
      extended by 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.


Field Summary
 
Fields inherited from class com.jme3.asset.AssetKey
extension, folder, name
 
Constructor Summary
TextureKey()
           
TextureKey(java.lang.String name)
           
TextureKey(java.lang.String name, boolean flipY)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getAnisotropy()
           
 java.lang.Class<? extends AssetCache> getCacheType()
           
 java.lang.Class<? extends AssetProcessor> getProcessorType()
           
 Texture.Type getTextureTypeHint()
           
 int hashCode()
           
 boolean isAsCube()
           
 boolean isAsTexture3D()
           
 boolean isFlipY()
           
 boolean isGenerateMips()
           
 void read(JmeImporter im)
           
 void setAnisotropy(int anisotropy)
           
 void setAsCube(boolean asCube)
           
 void setAsTexture3D(boolean asTexture3D)
           
 void setGenerateMips(boolean generateMips)
           
 void setTextureTypeHint(Texture.Type textureTypeHint)
           
 java.lang.String toString()
           
 void write(JmeExporter ex)
           
 
Methods inherited from class com.jme3.asset.AssetKey
clone, getExtension, getExtension, getFolder, getFolder, getName, reducePath
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextureKey

public TextureKey(java.lang.String name,
                  boolean flipY)

TextureKey

public TextureKey(java.lang.String name)

TextureKey

public TextureKey()
Method Detail

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