public class TextureAtlasSprite extends java.lang.Object implements java.lang.AutoCloseable, IForgeTextureAtlasSprite
Modifier and Type | Class and Description |
---|---|
static class |
TextureAtlasSprite.Info |
(package private) class |
TextureAtlasSprite.InterpolationData |
Modifier and Type | Field and Description |
---|---|
private AnimationMetadataSection |
animationMetadata |
private AtlasTexture |
atlasTexture |
private int |
frameCounter |
protected NativeImage[] |
frames |
private int[] |
framesX |
private int[] |
framesY |
private TextureAtlasSprite.InterpolationData |
interpolationData |
private float |
maxU |
private float |
maxV |
private float |
minU |
private float |
minV |
private TextureAtlasSprite.Info |
spriteInfo |
private int |
tickCounter |
private int |
x |
private int |
y |
Modifier | Constructor and Description |
---|---|
protected |
TextureAtlasSprite(AtlasTexture atlasTextureIn,
TextureAtlasSprite.Info spriteInfoIn,
int mipmapLevelsIn,
int atlasWidthIn,
int atlasHeightIn,
int xIn,
int yIn,
NativeImage imageIn) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
private float |
getAtlasSize() |
AtlasTexture |
getAtlasTexture() |
int |
getFrameCount() |
int |
getHeight() |
float |
getInterpolatedU(double u) |
float |
getInterpolatedV(double v) |
float |
getMaxU() |
float |
getMaxV() |
float |
getMinU() |
float |
getMinV() |
ResourceLocation |
getName() |
int |
getPixelRGBA(int frameIndex,
int x,
int y) |
float |
getUvShrinkRatio() |
int |
getWidth() |
boolean |
hasAnimationMetadata() |
boolean |
isPixelTransparent(int frameIndex,
int pixelX,
int pixelY) |
java.lang.String |
toString() |
void |
updateAnimation() |
private void |
uploadFrames(int index) |
private void |
uploadFrames(int xOffsetIn,
int yOffsetIn,
NativeImage[] framesIn) |
void |
uploadMipmaps() |
IVertexBuilder |
wrapBuffer(IVertexBuilder bufferIn) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDependencies, hasCustomLoader, load
private final AtlasTexture atlasTexture
private final TextureAtlasSprite.Info spriteInfo
private final AnimationMetadataSection animationMetadata
protected final NativeImage[] frames
private final int[] framesX
private final int[] framesY
@Nullable private final TextureAtlasSprite.InterpolationData interpolationData
private final int x
private final int y
private final float minU
private final float maxU
private final float minV
private final float maxV
private int frameCounter
private int tickCounter
protected TextureAtlasSprite(AtlasTexture atlasTextureIn, TextureAtlasSprite.Info spriteInfoIn, int mipmapLevelsIn, int atlasWidthIn, int atlasHeightIn, int xIn, int yIn, NativeImage imageIn)
private void uploadFrames(int index)
private void uploadFrames(int xOffsetIn, int yOffsetIn, NativeImage[] framesIn)
public int getWidth()
public int getHeight()
public float getMinU()
public float getMaxU()
public float getInterpolatedU(double u)
public float getMinV()
public float getMaxV()
public float getInterpolatedV(double v)
public ResourceLocation getName()
public AtlasTexture getAtlasTexture()
public int getFrameCount()
public void close()
close
in interface java.lang.AutoCloseable
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isPixelTransparent(int frameIndex, int pixelX, int pixelY)
public void uploadMipmaps()
private float getAtlasSize()
public float getUvShrinkRatio()
public void updateAnimation()
public boolean hasAnimationMetadata()
public IVertexBuilder wrapBuffer(IVertexBuilder bufferIn)
public int getPixelRGBA(int frameIndex, int x, int y)