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.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
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. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
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 | getHeight(int level) | Returns the height of that level, at least 1. |
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 | getWidth() | Returns the width of the first level. |
int | getHeight() | Returns the height of the first level. |
int | getLevels() | Returns the number of levels. |
Creation details
Section titled “Creation details”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.
Method details
Section titled “Method details”MipmapChain limit(int levels)
Returns the chain cut to that many levels, at least one.
getWidth
Section titled “getWidth”int getWidth(int level)
Returns the width of that level, at least 1.
int getWidth()
Returns the width of the first level.
getHeight
Section titled “getHeight”int getHeight(int level)
Returns the height of that level, at least 1.
int getHeight()
Returns the height of the first level.
forEachStep
Section titled “forEachStep”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.
getLevels
Section titled “getLevels”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
