Slice
The Slice struct defines a specific subset of a texture or image, using faces, layers, and mipmaps. It can be configured to represent a single face, layer, or mipmap level of an image. The struct includes methods for checking if the slice has multiple faces, layers, or mipmaps, and for adjusting or replacing slice sizes and bases.
#include <TellusimTypes.h>
Constructors
Slice()
Slice(const Face &f)
Slice(const Layer &l)
Slice(const Mipmap &m)
Slice(const Layer &l, const Face &f)
Slice(const Face &f, const Mipmap &m)
Slice(const Layer &l, const Mipmap &m)
Slice(const Layer &l, const Face &f, const Mipmap &m)
Methods
Slice parameters.
bool hasFaces() const
bool hasLayers() const
bool hasMipmaps() const
Face getFace() const
Layer getLayer() const
Mipmap getMipmap() const
Set slice parameters.
Slice setFace(uint32_t base, uint32_t size = 1) const
Slice setLayer(uint32_t base, uint32_t size = 1) const
Slice setMipmap(uint32_t base, uint32_t size = 1) const
Replace slice sizes.
Slice setSize(const Slice &s) const
Increment slice bases.
Slice addBase(const Slice &s) const
Variables
Type | Name | Value |
---|---|---|
uint32_t | face | 0 |
uint32_t | faces | 1 |
uint32_t | layer | 0 |
uint32_t | layers | 1 |
uint32_t | mipmap | 0 |
uint32_t | mipmaps | 1 |