Package com.gaia3d.basic.model
Class GaiaTexture
java.lang.Object
com.gaia3d.basic.model.structure.TextureStructure
com.gaia3d.basic.model.GaiaTexture
- All Implemented Interfaces:
Serializable
A class that represents a texture of a Gaia object.
It contains the texture name, path, type, width, height, format, byteLength, and byteBuffer.
The byteBuffer is used to create a texture.
The byteBuffer is created by reading the texture file.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()clone()booleanvoidcreateImage(int width, int height, int imageType) voidvoidvoidvoidbooleanbooleanisEqualTexture(GaiaTexture compareTexture) It's a slow comparison of two textures, but it's accurate.booleanisEqualTexture(GaiaTexture compareTexture, LevelOfDetail lod) voidvoidloadImage(LevelOfDetail lod) readImageScaled(Path imagePath, int dimensionLimit) voidresizeImage(int width, int height) voidboolean
-
Constructor Details
-
GaiaTexture
public GaiaTexture()
-
-
Method Details
-
loadImage
public void loadImage() -
hasBufferedImage
public boolean hasBufferedImage() -
deleteBufferedImage
public void deleteBufferedImage() -
readImageScaled
- Throws:
IOException
-
saveImage
-
saveImage
- Parameters:
savePath- Ruta de destino.fastPng- true para priorizar velocidad sobre tamaƱo del PNG.jpegQuality- Calidad JPEG entre 0.0 y 1.0.- Returns:
- true cuando la imagen se escribió correctamente.
-
flipImageY
public void flipImageY() -
getFullPath
-
createImage
public void createImage(int width, int height, int imageType) -
fillImage
-
loadImage
-
resizeImage
public void resizeImage(int width, int height) -
getPureBufferedImage
-
getBufferedImage
-
getBufferedImage
-
deleteObjects
public void deleteObjects() -
isEqualTexture
It's a slow comparison of two textures, but it's accurate. -
compareFileBytes
-
isEqualTexture
-
clear
public void clear() -
clone
-