Class TextureArrayLayer
java.lang.Object
dev.prozilla.pine.common.system.resource.image.TextureArrayLayer
- All Implemented Interfaces:
TextureBase
,Resource
Represents a layer of a texture array.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
bind()
Binds this texture.void
destroy()
Destroys the texture array.getArray()
int
int
getId()
getPath()
int
getWidth()
boolean
hasEqualLocation
(TextureBase other) Checks whether two textures are from the same location.boolean
void
unbind()
Unbinds this texture.
-
Constructor Details
-
TextureArrayLayer
-
-
Method Details
-
bind
public void bind()Description copied from interface:TextureBase
Binds this texture.- Specified by:
bind
in interfaceTextureBase
-
unbind
public void unbind()Description copied from interface:TextureBase
Unbinds this texture.- Specified by:
unbind
in interfaceTextureBase
-
hasEqualLocation
Description copied from interface:TextureBase
Checks whether two textures are from the same location.- Specified by:
hasEqualLocation
in interfaceTextureBase
- Parameters:
other
- Other texture- Returns:
- True if
other
is equal to this texture or in the same texture array.
-
getId
public int getId()- Specified by:
getId
in interfaceTextureBase
-
getWidth
public int getWidth()- Specified by:
getWidth
in interfaceTextureBase
- Returns:
- The width of this texture, in pixels.
-
getHeight
public int getHeight()- Specified by:
getHeight
in interfaceTextureBase
- Returns:
- The height of this texture, in pixels.
-
getPath
- Specified by:
getPath
in interfaceResource
- Specified by:
getPath
in interfaceTextureBase
- Returns:
- The path of the image file of this texture.
-
isInArray
public boolean isInArray()- Specified by:
isInArray
in interfaceTextureBase
- Returns:
- True if this texture is part of a texture array.
-
getArray
- Specified by:
getArray
in interfaceTextureBase
- Returns:
- The texture array this texture is part of, or
null
if this texture is not in a texture array.
-
destroy
public void destroy()Destroys the texture array.- Specified by:
destroy
in interfaceResource
- Specified by:
destroy
in interfaceTextureBase
-