Package com.xebisco.yield
Class OnDemandTexture
java.lang.Object
com.xebisco.yield.FileInput
com.xebisco.yield.AbstractTexture
com.xebisco.yield.OnDemandTexture
- All Implemented Interfaces:
AutoCloseable
The
OnDemandTexture class extends AbstractTexture and represents a texture that is loaded on demand.
It has a reference to a OnDemandTexture.ReturnTextureManager which is used to load and unload the texture.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceTheReturnIOManagerinterface provides a method to get theFileIOManager.static interfaceTheReturnTextureManagerinterface provides a method to get theTextureManager. -
Constructor Summary
ConstructorsConstructorDescriptionOnDemandTexture(String path, TextureFilter filter, OnDemandTexture.ReturnTextureManager textureManager, OnDemandTexture.ReturnIOManager ioManager) Constructs a newOnDemandTextureinstance with the specified path, filter, andOnDemandTexture.ReturnTextureManager. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the texture and releases any associated resources.static String[]Returns an array of string extensions that are supported by theOnDemandTextureclass.Returns theOnDemandTexture.ReturnIOManagerinstance.imageRef()Returns the reference to the image object.Returns theOnDemandTexture.ReturnTextureManagerinstance.Methods inherited from class com.xebisco.yield.AbstractTexture
filter, setImageRefMethods inherited from class com.xebisco.yield.FileInput
fileFormat, path
-
Constructor Details
-
OnDemandTexture
public OnDemandTexture(String path, TextureFilter filter, OnDemandTexture.ReturnTextureManager textureManager, OnDemandTexture.ReturnIOManager ioManager) Constructs a newOnDemandTextureinstance with the specified path, filter, andOnDemandTexture.ReturnTextureManager.- Parameters:
path- the path of the texture file.filter- the filter to be applied to the texture.textureManager- theOnDemandTexture.ReturnTextureManagerinstance.
-
-
Method Details
-
extensions
Returns an array of string extensions that are supported by theOnDemandTextureclass.- Returns:
- an array of string extensions.
-
close
public void close()Description copied from class:AbstractTextureCloses the texture and releases any associated resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classAbstractTexture
-
imageRef
Description copied from class:AbstractTextureReturns the reference to the image object.- Overrides:
imageRefin classAbstractTexture- Returns:
- The reference to the image object.
-
textureManager
Returns theOnDemandTexture.ReturnTextureManagerinstance.- Returns:
- the
OnDemandTexture.ReturnTextureManagerinstance.
-
getIoManager
Returns theOnDemandTexture.ReturnIOManagerinstance.- Returns:
- the
OnDemandTexture.ReturnIOManagerinstance.
-