TextureSampler

final class TextureSampler

Class TextureSampler. Provides texturesampler functionality for the Hytale server.

java.lang.Object > TextureSampler

Field Summary

cached

final BufferedImage cached

Field cached.

image

final BufferedImage image

Field image.

width

final int width

Field width.

height

final int height

Field height.

x

final int x

Field x.

y

final int y

Field y.

rgb

final int rgb

Field rgb.

rgba

final int rgba

Field rgba.

hasAlpha

final boolean hasAlpha

Field hasAlpha.

alpha

final int alpha

Field alpha.

r

final int r

Field r.

g

final int g

Field g.

b

final int b

Field b.

Method Detail

TextureSampler

public private TextureSampler ()

Method TextureSampler.

loadTexture

static BufferedImage loadTexture (@Nonnull final Path path)

Method loadTexture.

Parameters:
@Nonnull final Path path

sampleAt

static int[] sampleAt (@Nonnull final BufferedImage texture, float u, float v)

Method sampleAt.

Parameters:
@Nonnull final BufferedImage texture
float u
float v

sampleAlphaAt

static int sampleAlphaAt (@Nonnull final BufferedImage texture, float u, float v)

Method sampleAlphaAt.

Parameters:
@Nonnull final BufferedImage texture
float u
float v

clearCache

static void clearCache ()

Method clearCache.

getAverageColor

static int[] getAverageColor (@Nonnull final Path path)

Method getAverageColor.

Parameters:
@Nonnull final Path path