XII Release 0.1.0
Loading...
Searching...
No Matches
xiiImageView Class Reference

Copyright (c) Theophilus Eriata. All Rights Reserved. More...

#include <Image.h>

Inheritance diagram for xiiImageView:
[legend]

Public Member Functions

 xiiImageView ()
 Constructs an empty image view.
 xiiImageView (const xiiGALTextureCreationDescription &description, xiiConstByteBlobPtr imageData)
 Constructs an image view with the given description and image data.
void Clear ()
 Constructs an empty image view.
bool IsValid () const
 Returns false if the image view does not reference any data yet.
void ResetAndViewExternalStorage (const xiiGALTextureCreationDescription &description, xiiConstByteBlobPtr imageData)
 Constructs an image view with the given description and image data.
xiiResult SaveTo (xiiStringView sFileName) const
 Convenience function to save the image to the given file.
const xiiGALTextureCreationDescription & GetDescription () const
 Returns the description this image was constructed from.
xiiEnum< xiiGALResourceFormat > GetImageFormat () const
 Returns the image resource format.
xiiUInt32 GetWidth (xiiUInt32 uiMipLevel=0) const
 Returns width/height/depth for the given mip level.
xiiUInt32 GetHeight (xiiUInt32 uiMipLevel=0) const
xiiUInt32 GetDepth (xiiUInt32 uiMipLevel=0) const
xiiUInt32 GetMipLevelCount () const
xiiUInt32 GetNumFaces () const
xiiUInt32 GetNumArrayIndices () const
xiiUInt32 GetPlaneCount () const
xiiUInt32 GetNumBlocksX (xiiUInt32 uiMipLevel=0, xiiUInt32 uiPlaneIndex=0) const
xiiUInt32 GetNumBlocksY (xiiUInt32 uiMipLevel=0, xiiUInt32 uiPlaneIndex=0) const
xiiUInt32 GetNumBlocksZ (xiiUInt32 uiMipLevel=0, xiiUInt32 uiPlaneIndex=0) const
xiiUInt64 GetRowPitch (xiiUInt32 uiMipLevel=0, xiiUInt32 uiPlaneIndex=0) const
xiiUInt64 GetDepthPitch (xiiUInt32 uiMipLevel=0, xiiUInt32 uiPlaneIndex=0) const
xiiUInt64 ComputeDataSize () const
template<typename T>
xiiBlobPtr< const T > GetBlobPtr () const
 Returns a view to the entire data contained in this image.
xiiConstByteBlobPtr GetByteBlobPtr () const
xiiImageView GetSubImageView (xiiUInt32 uiMipLevel=0, xiiUInt32 uiFace=0, xiiUInt32 uiArrayIndex=0) const
 Returns a view to the given sub-image.
xiiImageView GetPlaneView (xiiUInt32 uiMipLevel=0, xiiUInt32 uiFace=0, xiiUInt32 uiArrayIndex=0, xiiUInt32 uiPlaneIndex=0) const
 Returns a view to a sub-plane.
xiiImageView GetSliceView (xiiUInt32 uiMipLevel=0, xiiUInt32 uiFace=0, xiiUInt32 uiArrayIndex=0, xiiUInt32 z=0, xiiUInt32 uiPlaneIndex=0) const
 Returns a view to z slice of the image.
xiiImageView GetRowView (xiiUInt32 uiMipLevel=0, xiiUInt32 uiFace=0, xiiUInt32 uiArrayIndex=0, xiiUInt32 y=0, xiiUInt32 z=0, xiiUInt32 uiPlaneIndex=0) const
 Returns a view to a row of pixels resp. blocks.
template<typename T>
const T * GetPixelPointer (xiiUInt32 uiMipLevel=0, xiiUInt32 uiFace=0, xiiUInt32 uiArrayIndex=0, xiiUInt32 x=0, xiiUInt32 y=0, xiiUInt32 z=0, xiiUInt32 uiPlaneIndex=0) const
 Returns a pointer to a given pixel or block contained in a sub-image.
void ReinterpretAs (xiiGALResourceFormat::Enum format)
 Reinterprets the image with a given format; the format must have the same size in bits per pixel as the current one.

Protected Member Functions

xiiUInt64 ComputeLayout ()
void ValidateSubImageIndices (xiiUInt32 uiMipLevel, xiiUInt32 uiFace, xiiUInt32 uiArrayIndex, xiiUInt32 uiPlaneIndex) const
template<typename T>
void ValidateDataTypeAccessor (xiiUInt32 uiPlaneIndex) const
const xiiUInt64 & GetSubImageOffset (xiiUInt32 uiMipLevel, xiiUInt32 uiFace, xiiUInt32 uiArrayIndex, xiiUInt32 uiPlaneIndex) const

Protected Attributes

xiiHybridArray< xiiUInt64, 16 > m_SubImageOffsets
xiiBlobPtr< xiiUInt8 > m_DataPtr
xiiGALTextureCreationDescription m_Description

Detailed Description

Copyright (c) Theophilus Eriata. All Rights Reserved.

A class referencing image data and holding metadata about the image.


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/Texture/Image/Image.h
  • /home/runner/work/XII/XII/Source/Engine/Texture/Image/Implementation/Image.cpp
  • /home/runner/work/XII/XII/Source/Engine/Texture/Image/Implementation/Image_inl.h