Class TextureArrayLayer
java.lang.Object
dev.prozilla.pine.common.asset.image.TextureArrayLayer
- All Implemented Interfaces:
Asset,TextureBase,Cloneable<TextureArrayLayer>,Destructible
Represents a layer of a texture array.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbind()Binds this texture.clone()Returns a new object that is equal to this object.voiddestroy()Destroys the texture array.booleanequals(TextureArrayLayer textureArrayLayer) Checks if the given object is equal to this object.booleangetArray()intintgetId()getPath()Returns the path to the file this asset was loaded from.intgetWidth()booleanhasEqualLocation(TextureBase other) Checks whether two textures are from the same location.inthashCode()booleanvoidunbind()Unbinds this texture.
-
Constructor Details
-
TextureArrayLayer
-
-
Method Details
-
bind
public void bind()Description copied from interface:TextureBaseBinds this texture.- Specified by:
bindin interfaceTextureBase
-
unbind
public void unbind()Description copied from interface:TextureBaseUnbinds this texture.- Specified by:
unbindin interfaceTextureBase
-
hasEqualLocation
Description copied from interface:TextureBaseChecks whether two textures are from the same location.- Specified by:
hasEqualLocationin interfaceTextureBase- Parameters:
other- Other texture- Returns:
- True if
otheris equal to this texture or in the same texture array.
-
getId
public int getId()- Specified by:
getIdin interfaceTextureBase
-
getWidth
public int getWidth()- Specified by:
getWidthin interfaceTextureBase- Returns:
- The width of this texture, in pixels.
-
getHeight
public int getHeight()- Specified by:
getHeightin interfaceTextureBase- Returns:
- The height of this texture, in pixels.
-
getPath
Description copied from interface:AssetReturns the path to the file this asset was loaded from.- Specified by:
getPathin interfaceAsset- Specified by:
getPathin interfaceTextureBase- Returns:
- The path of the image file of this texture.
-
isInArray
public boolean isInArray()- Specified by:
isInArrayin interfaceTextureBase- Returns:
- True if this texture is part of a texture array.
-
getArray
- Specified by:
getArrayin interfaceTextureBase- Returns:
- The texture array this texture is part of, or
nullif this texture is not in a texture array.
-
equals
-
equals
Description copied from interface:CloneableChecks if the given object is equal to this object.- Specified by:
equalsin interfaceCloneable<TextureArrayLayer>- Parameters:
textureArrayLayer- Other object- Returns:
trueif both objects are equal.
-
hashCode
public int hashCode() -
clone
Description copied from interface:CloneableReturns a new object that is equal to this object.- Specified by:
clonein interfaceCloneable<TextureArrayLayer>- Overrides:
clonein classObject- Returns:
- Clone of this object
-
destroy
public void destroy()Destroys the texture array.- Specified by:
destroyin interfaceAsset- Specified by:
destroyin interfaceDestructible- Specified by:
destroyin interfaceTextureBase
-