Package com.jme3.asset
Class TextureKey
- Direct Known Subclasses:
ContentTextureKey
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Class<? extends AssetCache>
Class<? extends AssetProcessor>
The type of texture expected to be returned.int
hashCode()
boolean
isFlipY()
boolean
void
read
(JmeImporter im) void
setAnisotropy
(int anisotropy) void
setFlipY
(boolean flipY) void
setGenerateMips
(boolean generateMips) void
setTextureTypeHint
(Texture.Type textureTypeHint) Hints the loader as to which type of texture is expected.toString()
void
write
(JmeExporter ex) Methods inherited from class com.jme3.asset.AssetKey
clone, getExtension, getExtension, getFolder, getFolder, getName, reducePath
-
Constructor Details
-
TextureKey
-
TextureKey
-
TextureKey
public TextureKey()
-
-
Method Details
-
toString
-
getCacheType
- Overrides:
getCacheType
in classAssetKey<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
- Overrides:
getProcessorType
in classAssetKey<Texture>
- Returns:
- The preferred processor type for this asset type. Specify "null" if no processing is required.
-
isFlipY
public boolean isFlipY() -
setFlipY
public void setFlipY(boolean flipY) -
getAnisotropy
public int getAnisotropy() -
setAnisotropy
public void setAnisotropy(int anisotropy) -
isGenerateMips
public boolean isGenerateMips() -
setGenerateMips
public void setGenerateMips(boolean generateMips) -
getTextureTypeHint
The type of texture expected to be returned.- Returns:
- type of texture expected to be returned.
-
setTextureTypeHint
Hints the loader as to which type of texture is expected.- Parameters:
textureTypeHint
- The type of texture expected to be loaded.
-
equals
-
hashCode
public int hashCode() -
write
-
read
-