6 static constexpr size_t Size =
sizeof(T);
12 static constexpr size_t Size = 1;
18 static constexpr size_t Size = 1;
24 for (plUInt32 uiPlaneIndex = 0; uiPlaneIndex <
GetPlaneCount(); ++uiPlaneIndex)
26 ValidateDataTypeAccessor<T>(uiPlaneIndex);
33 for (plUInt32 uiPlaneIndex = 0; uiPlaneIndex <
GetPlaneCount(); ++uiPlaneIndex)
35 ValidateDataTypeAccessor<plUInt8>(uiPlaneIndex);
57 plUInt32 y , plUInt32 z , plUInt32 uiPlaneIndex )
const
59 ValidateDataTypeAccessor<T>(uiPlaneIndex);
60 PL_ASSERT_DEV(x <
GetNumBlocksX(uiMipLevel, uiPlaneIndex),
"Invalid x coordinate");
61 PL_ASSERT_DEV(y <
GetNumBlocksY(uiMipLevel, uiPlaneIndex),
"Invalid y coordinate");
62 PL_ASSERT_DEV(z <
GetNumBlocksZ(uiMipLevel, uiPlaneIndex),
"Invalid z coordinate");
64 plUInt64 offset = GetSubImageOffset(uiMipLevel, uiFace, uiArrayIndex, uiPlaneIndex) +
68 return reinterpret_cast<const T*
>(&m_DataPtr[offset]);
73 plUInt32 uiMipLevel , plUInt32 uiFace , plUInt32 uiArrayIndex , plUInt32 x , plUInt32 y , plUInt32 z , plUInt32 uiPlaneIndex )
80void plImageView::ValidateDataTypeAccessor(plUInt32 uiPlaneIndex)
const
83 PL_IGNORE_UNUSED(bytesPerBlock);
This class encapsulates a blob's storage and it's size. It is recommended to use this class instead o...
Definition Blob.h:13
PL_ALWAYS_INLINE PointerType GetPtr() const
Returns the pointer to the array.
Definition Blob.h:80
PL_ALWAYS_INLINE plUInt64 GetCount() const
Returns the number of elements in the array.
Definition Blob.h:95
T * GetPixelPointer(plUInt32 uiMipLevel=0, plUInt32 uiFace=0, plUInt32 uiArrayIndex=0, plUInt32 x=0, plUInt32 y=0, plUInt32 z=0, plUInt32 uiPlaneIndex=0)
Returns a pointer to a given pixel or block contained in a sub-image.
Definition Image_inl.h:72
plBlobPtr< T > GetBlobPtr()
Returns a view to the entire data contained in this image.
Definition Image_inl.h:41
plUInt32 GetNumBlocksZ(plUInt32 uiMipLevel=0, plUInt32 uiPlaneIndex=0) const
Returns the number of blocks contained in a given mip level in the depth direction.
Definition ImageHeader.h:111
plBlobPtr< const T > GetBlobPtr() const
Returns a view to the entire data contained in this image.
Definition Image_inl.h:22
plUInt32 GetPlaneCount() const
Returns the number of image planes.
Definition ImageHeader.h:93
plUInt64 GetRowPitch(plUInt32 uiMipLevel=0, plUInt32 uiPlaneIndex=0) const
Returns the offset in bytes between two subsequent rows of the given mip level.
Definition ImageHeader.h:117
plImageFormat::Enum GetImageFormat() const
Returns the image format.
Definition ImageHeader.h:36
plUInt32 GetNumBlocksY(plUInt32 uiMipLevel=0, plUInt32 uiPlaneIndex=0) const
Returns the number of blocks contained in a given mip level in the horizontal direction.
Definition ImageHeader.h:105
plUInt32 GetNumBlocksX(plUInt32 uiMipLevel=0, plUInt32 uiPlaneIndex=0) const
Returns the number of blocks contained in a given mip level in the horizontal direction.
Definition ImageHeader.h:99
plUInt64 GetDepthPitch(plUInt32 uiMipLevel=0, plUInt32 uiPlaneIndex=0) const
Returns the offset in bytes between two subsequent depth slices of the given mip level.
Definition ImageHeader.h:123
const T * GetPixelPointer(plUInt32 uiMipLevel=0, plUInt32 uiFace=0, plUInt32 uiArrayIndex=0, plUInt32 x=0, plUInt32 y=0, plUInt32 z=0, plUInt32 uiPlaneIndex=0) const
Returns a pointer to a given pixel or block contained in a sub-image.
Definition Image_inl.h:56