Class VolumeTextureLoader

java.lang.Object
com.badlogic.gdx.assets.loaders.AssetLoader<VolumeTexture, VolumeTextureLoader.VolumeTextureParameter>
com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader<VolumeTexture, VolumeTextureLoader.VolumeTextureParameter>
gaiasky.render.gdx.loader.VolumeTextureLoader

public class VolumeTextureLoader extends com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader<VolumeTexture, VolumeTextureLoader.VolumeTextureParameter>
Loads 3D volume textures.

A volume is a density (R8), colour (RGB8) or colour+density (RGBA8) grid, stored raw and gzip-compressed, with a _metadata.txt sidecar that gives the world-space box and, since non-cubic grids are supported, the Grid size:. The metadata's grid is authoritative when present, because a byte count alone can only ever yield a cube.

Everything the metadata describes - grid, box - is in the file's own (W, H, D) order. The texture GL ends up with indexes those axes in reverse, because glTexImage3D varies its first axis fastest while a C-order array varies its last one fastest. glGrid(Trio) and glBounds(Vector3) apply that permutation, and they have to be applied together. See glGrid(Trio) for why this only ever bites on a non-cubic grid.