Skip to content

MipmapChain

final class MipmapChain
Package: dev.joid.lib.bridge.render.texture · Module: core · Source: MipmapChain.java

The levels of a mipmapped texture, each half the size of the previous one down to 1 pixel.

ReturnsSignatureSummary
MipmapChainof(int width, int height, boolean mipmapped) factoryReturns the chain of a texture of that size: every level down to 1×1 when mipmapped, the first level alone otherwise.

ReturnsSignatureSummary
MipmapChainlimit(int levels)Returns the chain cut to that many levels, at least one.
intgetWidth(int level)Returns the width of that level, at least 1.
intgetHeight(int level)Returns the height of that level, at least 1.
voidforEachStep(MipmapStep step)Calls the step for each level after the first, with the size of the level above it and its own size.
intgetWidth()Returns the width of the first level.
intgetHeight()Returns the height of the first level.
intgetLevels()Returns the number of levels.

MipmapChain of(int width, int height, boolean mipmapped) factory

Returns the chain of a texture of that size: every level down to 1×1 when mipmapped, the first level alone otherwise.

MipmapChain limit(int levels)

Returns the chain cut to that many levels, at least one.

int getWidth(int level)

Returns the width of that level, at least 1.

int getWidth()

Returns the width of the first level.

int getHeight(int level)

Returns the height of that level, at least 1.

int getHeight()

Returns the height of the first level.

void forEachStep(MipmapStep step)

Calls the step for each level after the first, with the size of the level above it and its own size.

int getLevels()

Returns the number of levels.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page