![]() |
XII Release 0.1.0
|
A class containing image meta data, such as format and dimensions. More...
#include <ImageHeader.h>
Public Member Functions | |
xiiImageHeader () | |
Constructs an image using an unknown format and zero size. | |
void | Clear () |
Constructs an image using an unknown format and zero size. | |
void | SetImageFormat (const xiiImageFormat::Enum &format) |
Sets the image format. | |
xiiImageFormat::Enum | GetImageFormat () const |
Returns the image format. | |
void | SetWidth (xiiUInt32 uiWidth) |
Sets the image width. | |
xiiUInt32 | GetWidth (xiiUInt32 uiMipLevel=0) const |
Returns the image width for a given mip level, clamped to 1. | |
void | SetHeight (xiiUInt32 uiHeight) |
Sets the image height. | |
xiiUInt32 | GetHeight (xiiUInt32 uiMipLevel=0) const |
Returns the image height for a given mip level, clamped to 1. | |
void | SetDepth (xiiUInt32 uiDepth) |
Sets the image depth. The default is 1. | |
xiiUInt32 | GetDepth (xiiUInt32 uiMipLevel=0) const |
Returns the image depth for a given mip level, clamped to 1. | |
void | SetNumMipLevels (xiiUInt32 uiNumMipLevels) |
Sets the number of mip levels, including the full-size image. | |
xiiUInt32 | GetNumMipLevels () const |
Returns the number of mip levels, including the full-size image. | |
void | SetNumFaces (xiiUInt32 uiNumFaces) |
Sets the number of cubemap faces. Use 1 for a non-cubemap. | |
xiiUInt32 | GetNumFaces () const |
Returns the number of cubemap faces, or 1 for a non-cubemap. | |
void | SetNumArrayIndices (xiiUInt32 uiNumArrayIndices) |
Sets the number of array indices. | |
xiiUInt32 | GetNumArrayIndices () const |
Returns the number of array indices. | |
xiiUInt32 | GetPlaneCount () const |
Returns the number of image planes. | |
xiiUInt32 | GetNumBlocksX (xiiUInt32 uiMipLevel=0, xiiUInt32 uiPlaneIndex=0) const |
Returns the number of blocks contained in a given mip level in the horizontal direction. | |
xiiUInt32 | GetNumBlocksY (xiiUInt32 uiMipLevel=0, xiiUInt32 uiPlaneIndex=0) const |
Returns the number of blocks contained in a given mip level in the horizontal direction. | |
xiiUInt32 | GetNumBlocksZ (xiiUInt32 uiMipLevel=0, xiiUInt32 uiPlaneIndex=0) const |
Returns the number of blocks contained in a given mip level in the depth direction. | |
xiiUInt64 | GetRowPitch (xiiUInt32 uiMipLevel=0, xiiUInt32 uiPlaneIndex=0) const |
Returns the offset in bytes between two subsequent rows of the given mip level. | |
xiiUInt64 | GetDepthPitch (xiiUInt32 uiMipLevel=0, xiiUInt32 uiPlaneIndex=0) const |
Returns the offset in bytes between two subsequent depth slices of the given mip level. | |
xiiUInt64 | ComputeDataSize () const |
Computes the data size required for an image with the header's format and dimensions. | |
xiiUInt32 | ComputeNumberOfMipMaps () const |
Computes the number of mip maps in the full mip chain. | |
bool | operator== (const xiiImageHeader &other) const |
Protected Attributes | |
xiiUInt32 | m_uiNumMipLevels |
xiiUInt32 | m_uiNumFaces |
xiiUInt32 | m_uiNumArrayIndices |
xiiUInt32 | m_uiWidth |
xiiUInt32 | m_uiHeight |
xiiUInt32 | m_uiDepth |
xiiImageFormat::Enum | m_Format |
A class containing image meta data, such as format and dimensions.
This class has no associated behavior or functionality, and its getters and setters have no effect other than changing the contained value. It is intended as a container to be modified by image utils and loaders.
|
inline |
Sets the number of array indices.
Setting this to 0 will result in an empty image.
|
inline |
Sets the number of cubemap faces. Use 1 for a non-cubemap.
Setting this to 0 will result in an empty image.
|
inline |
Sets the number of mip levels, including the full-size image.
Setting this to 0 will result in an empty image.