Plasma Engine  2.0
Loading...
Searching...
No Matches
plImageHeader Class Reference

A class containing image meta data, such as format and dimensions. More...

#include <ImageHeader.h>

Inheritance diagram for plImageHeader:

Public Member Functions

 plImageHeader ()
 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 plImageFormat::Enum &format)
 Sets the image format.
 
plImageFormat::Enum GetImageFormat () const
 Returns the image format.
 
void SetWidth (plUInt32 uiWidth)
 Sets the image width.
 
plUInt32 GetWidth (plUInt32 uiMipLevel=0) const
 Returns the image width for a given mip level, clamped to 1.
 
void SetHeight (plUInt32 uiHeight)
 Sets the image height.
 
plUInt32 GetHeight (plUInt32 uiMipLevel=0) const
 Returns the image height for a given mip level, clamped to 1.
 
void SetDepth (plUInt32 uiDepth)
 Sets the image depth. The default is 1.
 
plUInt32 GetDepth (plUInt32 uiMipLevel=0) const
 Returns the image depth for a given mip level, clamped to 1.
 
void SetNumMipLevels (plUInt32 uiNumMipLevels)
 Sets the number of mip levels, including the full-size image.
 
plUInt32 GetNumMipLevels () const
 Returns the number of mip levels, including the full-size image.
 
void SetNumFaces (plUInt32 uiNumFaces)
 Sets the number of cubemap faces. Use 1 for a non-cubemap.
 
plUInt32 GetNumFaces () const
 Returns the number of cubemap faces, or 1 for a non-cubemap.
 
void SetNumArrayIndices (plUInt32 uiNumArrayIndices)
 Sets the number of array indices.
 
plUInt32 GetNumArrayIndices () const
 Returns the number of array indices.
 
plUInt32 GetPlaneCount () const
 Returns the number of image planes.
 
plUInt32 GetNumBlocksX (plUInt32 uiMipLevel=0, plUInt32 uiPlaneIndex=0) const
 Returns the number of blocks contained in a given mip level in the horizontal direction.
 
plUInt32 GetNumBlocksY (plUInt32 uiMipLevel=0, plUInt32 uiPlaneIndex=0) const
 Returns the number of blocks contained in a given mip level in the horizontal direction.
 
plUInt32 GetNumBlocksZ (plUInt32 uiMipLevel=0, plUInt32 uiPlaneIndex=0) const
 Returns the number of blocks contained in a given mip level in the depth direction.
 
plUInt64 GetRowPitch (plUInt32 uiMipLevel=0, plUInt32 uiPlaneIndex=0) const
 Returns the offset in bytes between two subsequent rows of the given mip level.
 
plUInt64 GetDepthPitch (plUInt32 uiMipLevel=0, plUInt32 uiPlaneIndex=0) const
 Returns the offset in bytes between two subsequent depth slices of the given mip level.
 
plUInt64 ComputeDataSize () const
 Computes the data size required for an image with the header's format and dimensions.
 
plUInt32 ComputeNumberOfMipMaps () const
 Computes the number of mip maps in the full mip chain.
 
bool operator== (const plImageHeader &other) const
 
bool operator!= (const plImageHeader &other) const
 

Protected Attributes

plUInt32 m_uiNumMipLevels
 
plUInt32 m_uiNumFaces
 
plUInt32 m_uiNumArrayIndices
 
plUInt32 m_uiWidth
 
plUInt32 m_uiHeight
 
plUInt32 m_uiDepth
 
plImageFormat::Enum m_Format
 

Detailed Description

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.

Member Function Documentation

◆ SetNumArrayIndices()

void plImageHeader::SetNumArrayIndices ( plUInt32 uiNumArrayIndices)
inline

Sets the number of array indices.

Setting this to 0 will result in an empty image.

◆ SetNumFaces()

void plImageHeader::SetNumFaces ( plUInt32 uiNumFaces)
inline

Sets the number of cubemap faces. Use 1 for a non-cubemap.

Setting this to 0 will result in an empty image.

◆ SetNumMipLevels()

void plImageHeader::SetNumMipLevels ( plUInt32 uiNumMipLevels)
inline

Sets the number of mip levels, including the full-size image.

Setting this to 0 will result in an empty image.


The documentation for this class was generated from the following file: