Class TextureArrayLayer
java.lang.Object
dev.prozilla.pine.common.asset.image.TextureArrayLayer
- All Implemented Interfaces:
Asset,TextureAsset,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()intReturns the height of this texture.intgetId()getPath()Returns the path to the file this asset was loaded from.intgetWidth()Returns the width of this texture.booleanhasEqualLocation(TextureAsset other) Checks whether two textures are from the same location.inthashCode()booleanvoidsetParameter(int name, int value) Sets the value of a parameter of this texture.voidunbind()Unbinds this texture.Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.prozilla.pine.common.asset.image.TextureBase
setFilter, setWrap
-
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
-
setParameter
public void setParameter(int name, int value) Description copied from interface:TextureBaseSets the value of a parameter of this texture.- Specified by:
setParameterin interfaceTextureBase- Parameters:
name- The name of the parametervalue- The value to assign
-
hasEqualLocation
Description copied from interface:TextureAssetChecks whether two textures are from the same location.- Specified by:
hasEqualLocationin interfaceTextureAsset- 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()Description copied from interface:TextureBaseReturns the width of this texture.- Specified by:
getWidthin interfaceTextureBase- Returns:
- The width of this texture, in pixels.
-
getHeight
public int getHeight()Description copied from interface:TextureBaseReturns the height of this texture.- 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 interfaceTextureAsset- Returns:
- The path of the image file of this texture.
-
isInArray
public boolean isInArray()- Specified by:
isInArrayin interfaceTextureAsset- Returns:
- True if this texture is part of a texture array.
-
getArray
- Specified by:
getArrayin interfaceTextureAsset- 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 interfaceTextureAsset
-