![]() |
OGRE-Next 3.0.0
Object-Oriented Graphics Rendering Engine
|
For cubemaps, the face is in sliceStart, (see CubemapSide::CubemapSide) For cubemap arrays, the cubemaps are addressed as sliceStart * 6. More...
#include <OgreTextureBox.h>
Public Member Functions | |
TextureBox () | |
TextureBox (uint32 _width, uint32 _height, uint32 _depth, uint32 _numSlices, uint32 _bytesPerPixel, uint32 _bytesPerRow, size_t _bytesPerImage) | |
void * | at (size_t xPos, size_t yPos, size_t zPos) const |
x, y & z are in pixels. | |
void * | atFromOffsettedOrigin (size_t xPos, size_t yPos, size_t zPos) const |
void | copyFrom (const TextureBox &src) |
void | copyFrom (const void *srcData, uint32 _width, uint32 _height, uint32 _bytesPerRow) |
bool | equalSize (const TextureBox &other) const |
Returns true if 'other' & 'this' have the same dimensions. | |
bool | fullyContains (const TextureBox &other) const |
Returns true if 'other' fits inside 'this' (fully, not partially) | |
ColourValue | getColourAt (size_t _x, size_t _y, size_t _z, PixelFormatGpu pixelFormat) const |
Get colour value from a certain location in the image. | |
PixelFormatGpu | getCompressedPixelFormat () const |
uint32 | getDepthOrSlices () const |
uint32 | getMaxSlice () const |
uint32 | getMaxX () const |
uint32 | getMaxY () const |
uint32 | getMaxZ () const |
size_t | getSizeBytes () const |
uint32 | getZOrSlice () const |
bool | isCompressed () const |
bool | isSubtextureRegion () const |
Returns true if this TextureBox does not represent a contiguous region of a single slice of full texture, and is instead a 2D subregion of a larger texture. | |
bool | overlaps (const TextureBox &other) const |
Returns true if 'this' and 'other' are in partial or full collision. | |
void | setColourAt (const ColourValue &cv, size_t _x, size_t _y, size_t _z, PixelFormatGpu pixelFormat) |
Set colour value at a certain location in the image. | |
void | setCompressedPixelFormat (PixelFormatGpu pixelFormat) |
Public Attributes | |
size_t | bytesPerImage |
uint32 | bytesPerPixel |
When TextureBox contains a compressed format, bytesPerPixel contains the pixel format instead. | |
uint32 | bytesPerRow |
void * | data |
Pointer is never owned by us. | |
uint32 | depth |
uint32 | height |
uint32 | numSlices |
uint32 | sliceStart |
uint32 | width |
uint32 | x |
uint32 | y |
uint32 | z |
For cubemaps, the face is in sliceStart, (see CubemapSide::CubemapSide) For cubemap arrays, the cubemaps are addressed as sliceStart * 6.
|
inline |
References bytesPerImage, bytesPerPixel, bytesPerRow, data, depth, height, numSlices, sliceStart, width, x, y, and z.
Referenced by copyFrom(), copyFrom(), equalSize(), fullyContains(), and overlaps().
|
inline |
References bytesPerImage, bytesPerPixel, bytesPerRow, data, depth, height, numSlices, sliceStart, width, x, y, and z.
|
inline |
x, y & z are in pixels.
Only works for non-compressed formats. It can work for compressed formats if xPos & yPos are 0.
References bytesPerImage, bytesPerPixel, bytesPerRow, data, Ogre::PixelFormatGpuUtils::getCompressedBlockHeight(), Ogre::PixelFormatGpuUtils::getCompressedBlockSize(), Ogre::PixelFormatGpuUtils::getCompressedBlockWidth(), getCompressedPixelFormat(), and isCompressed().
Referenced by atFromOffsettedOrigin(), and copyFrom().
|
inline |
References at(), getZOrSlice(), x, and y.
|
inline |
References TextureBox(), at(), bytesPerImage, bytesPerRow, Ogre::PixelFormatGpuUtils::getCompressedBlockHeight(), Ogre::PixelFormatGpuUtils::getCompressedBlockSize(), Ogre::PixelFormatGpuUtils::getCompressedBlockWidth(), getCompressedPixelFormat(), getDepthOrSlices(), getZOrSlice(), height, isCompressed(), isSubtextureRegion(), width, x, and y.
Referenced by copyFrom().
|
inline |
References TextureBox(), copyFrom(), and data.
|
inline |
Returns true if 'other' & 'this' have the same dimensions.
References TextureBox(), depth, height, numSlices, and width.
|
inline |
Returns true if 'other' fits inside 'this' (fully, not partially)
References TextureBox(), getMaxSlice(), getMaxX(), getMaxY(), getMaxZ(), sliceStart, x, y, and z.
ColourValue Ogre::TextureBox::getColourAt | ( | size_t | _x, |
size_t | _y, | ||
size_t | _z, | ||
PixelFormatGpu | pixelFormat ) const |
Get colour value from a certain location in the image.
|
inline |
References bytesPerPixel, and Ogre::PFG_UNKNOWN.
Referenced by at(), copyFrom(), and isSubtextureRegion().
|
inline |
References depth, and numSlices.
Referenced by copyFrom().
|
inline |
References numSlices, and sliceStart.
Referenced by fullyContains(), and overlaps().
|
inline |
Referenced by fullyContains(), and overlaps().
|
inline |
Referenced by fullyContains(), and overlaps().
|
inline |
Referenced by fullyContains(), and overlaps().
|
inline |
References bytesPerImage, depth, and numSlices.
|
inline |
References sliceStart, and z.
Referenced by atFromOffsettedOrigin(), and copyFrom().
|
inline |
References bytesPerPixel.
Referenced by at(), copyFrom(), and isSubtextureRegion().
|
inline |
Returns true if this TextureBox does not represent a contiguous region of a single slice of full texture, and is instead a 2D subregion of a larger texture.
References bytesPerImage, bytesPerPixel, bytesPerRow, Ogre::PixelFormatGpuUtils::getCompressedBlockHeight(), Ogre::PixelFormatGpuUtils::getCompressedBlockSize(), Ogre::PixelFormatGpuUtils::getCompressedBlockWidth(), getCompressedPixelFormat(), height, isCompressed(), width, x, and y.
Referenced by copyFrom().
|
inline |
Returns true if 'this' and 'other' are in partial or full collision.
References TextureBox(), getMaxSlice(), getMaxX(), getMaxY(), getMaxZ(), sliceStart, x, y, and z.
void Ogre::TextureBox::setColourAt | ( | const ColourValue & | cv, |
size_t | _x, | ||
size_t | _y, | ||
size_t | _z, | ||
PixelFormatGpu | pixelFormat ) |
Set colour value at a certain location in the image.
|
inline |
References bytesPerPixel, and Ogre::PixelFormatGpuUtils::isCompressed().
size_t Ogre::TextureBox::bytesPerImage |
Referenced by TextureBox(), TextureBox(), at(), copyFrom(), getSizeBytes(), and isSubtextureRegion().
uint32 Ogre::TextureBox::bytesPerPixel |
When TextureBox contains a compressed format, bytesPerPixel contains the pixel format instead.
See getCompressedPixelFormat.
Referenced by TextureBox(), TextureBox(), at(), getCompressedPixelFormat(), isCompressed(), isSubtextureRegion(), and setCompressedPixelFormat().
uint32 Ogre::TextureBox::bytesPerRow |
Referenced by TextureBox(), TextureBox(), at(), copyFrom(), and isSubtextureRegion().
void* Ogre::TextureBox::data |
Pointer is never owned by us.
Do not alter where data points to (e.g. do not increment it)
Referenced by TextureBox(), TextureBox(), at(), and copyFrom().
uint32 Ogre::TextureBox::depth |
Referenced by TextureBox(), TextureBox(), equalSize(), getDepthOrSlices(), getMaxZ(), and getSizeBytes().
uint32 Ogre::TextureBox::height |
Referenced by TextureBox(), TextureBox(), copyFrom(), equalSize(), getMaxY(), and isSubtextureRegion().
uint32 Ogre::TextureBox::numSlices |
Referenced by TextureBox(), TextureBox(), equalSize(), getDepthOrSlices(), getMaxSlice(), and getSizeBytes().
uint32 Ogre::TextureBox::sliceStart |
Referenced by TextureBox(), TextureBox(), fullyContains(), getMaxSlice(), getZOrSlice(), and overlaps().
uint32 Ogre::TextureBox::width |
Referenced by TextureBox(), TextureBox(), copyFrom(), equalSize(), getMaxX(), and isSubtextureRegion().
uint32 Ogre::TextureBox::x |
Referenced by TextureBox(), TextureBox(), atFromOffsettedOrigin(), copyFrom(), fullyContains(), getMaxX(), isSubtextureRegion(), and overlaps().
uint32 Ogre::TextureBox::y |
Referenced by TextureBox(), TextureBox(), atFromOffsettedOrigin(), copyFrom(), fullyContains(), getMaxY(), isSubtextureRegion(), and overlaps().
uint32 Ogre::TextureBox::z |
Referenced by TextureBox(), TextureBox(), fullyContains(), getMaxZ(), getZOrSlice(), and overlaps().