OGRE 2.1
Object-Oriented Graphics Rendering Engine
|
#include <OgrePixelBox.h>
Public Member Functions | |
PixelBox () | |
Parameter constructor for setting the members manually. | |
PixelBox (const Box &extents, PixelFormat pixelFormat, void *pixelData=0) | |
Constructor providing extents in the form of a Box object. | |
PixelBox (uint32 width, uint32 height, uint32 depth, PixelFormat pixelFormat, void *pixelData=0) | |
Constructor providing width, height and depth. | |
~PixelBox () | |
bool | contains (const Box &def) const |
Return true if the other box is a part of this one. | |
ColourValue | getColourAt (size_t x, size_t y, size_t z) |
Get colour value from a certain location in the PixelBox. | |
size_t | getConsecutiveSize () const |
Return the size (in bytes) this image would take if it was laid out consecutive in memory. | |
uint32 | getDepth () const |
Get the depth of this box. | |
uint32 | getHeight () const |
Get the height of this box. | |
size_t | getRowSkip () const |
Get the number of elements between one past the rightmost pixel of one row and the leftmost pixel of the next row. | |
size_t | getSliceSkip () const |
Get the number of elements between one past the right bottom pixel of one slice and the left top pixel of the next slice. | |
size_t | getSliceSkipAlwaysBytes () const |
PixelBox | getSubVolume (const Box &def, bool resetOrigin=true) const |
Return a subvolume of this PixelBox. | |
void * | getTopLeftFrontPixelPtr () const |
Return a data pointer pointing to top left front pixel of the pixel box. | |
uint32 | getWidth () const |
Get the width of this box. | |
bool | isConsecutive () const |
Return whether this buffer is laid out consecutive in memory (ie the pitches are equal to the dimensions) | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete (void *ptr, void *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info | |
void * | operator new (size_t sz, void *ptr) |
placement operator new | |
void * | operator new[] (size_t sz) |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info | |
size_t | rowPitchAlwaysBytes (void) const |
Returns rowPitch, but always in bytes. | |
void | setColourAt (ColourValue const &cv, size_t x, size_t y, size_t z) |
Set colour value at a certain location in the PixelBox. | |
void | setConsecutive () |
Set the rowPitch and slicePitch so that the buffer is laid out consecutive in memory. | |
size_t | slicePitchAlwaysBytes (void) const |
Returns slicePitch, but always in bytes. | |
Public Attributes | |
uint32 | back |
uint32 | bottom |
void * | data |
The data pointer. | |
PixelFormat | format |
The pixel format. | |
uint32 | front |
uint32 | left |
uint32 | right |
size_t | rowPitch |
Number of elements between the leftmost pixel of one row and the left pixel of the next. | |
size_t | slicePitch |
Number of elements between the top left pixel of one (depth) slice and the top left pixel of the next. | |
uint32 | top |
|
inline |
Parameter constructor for setting the members manually.
|
inline |
|
inline |
Constructor providing extents in the form of a Box object.
This constructor assumes the pixel data is laid out consecutively in memory. (this means row after row, slice after slice, with no space in between)
extents | Extents of the region defined by data |
pixelFormat | Format of this buffer |
pixelData | Pointer to the actual data |
|
inline |
Constructor providing width, height and depth.
This constructor assumes the pixel data is laid out consecutively in memory. (this means row after row, slice after slice, with no space in between)
width | Width of the region |
height | Height of the region |
depth | Depth of the region |
pixelFormat | Format of this buffer |
pixelData | Pointer to the actual data |
Return true if the other box is a part of this one.
References Ogre::Box::back, Ogre::Box::bottom, Ogre::Box::front, Ogre::Box::left, Ogre::Box::right, and Ogre::Box::top.
ColourValue Ogre::PixelBox::getColourAt | ( | size_t | x, |
size_t | y, | ||
size_t | z | ||
) |
Get colour value from a certain location in the PixelBox.
The z coordinate is only valid for cubemaps and volume textures. This uses the first (largest) mipmap.
size_t Ogre::PixelBox::getConsecutiveSize | ( | ) | const |
Return the size (in bytes) this image would take if it was laid out consecutive in memory.
|
inlineinherited |
Get the depth of this box.
References Ogre::Box::back, and Ogre::Box::front.
Referenced by Ogre::NearestResampler< elemsize >::scale(), Ogre::LinearResampler::scale(), Ogre::LinearResampler_Float32::scale(), and Ogre::LinearResampler_Byte< channels >::scale().
|
inlineinherited |
Get the height of this box.
References Ogre::Box::bottom, and Ogre::Box::top.
Referenced by Ogre::NearestResampler< elemsize >::scale(), Ogre::LinearResampler::scale(), Ogre::LinearResampler_Float32::scale(), and Ogre::LinearResampler_Byte< channels >::scale().
size_t Ogre::PixelBox::getRowSkip | ( | ) | const |
Get the number of elements between one past the rightmost pixel of one row and the leftmost pixel of the next row.
(IE this is zero if rows are consecutive).
Referenced by Ogre::NearestResampler< elemsize >::scale(), Ogre::LinearResampler::scale(), Ogre::LinearResampler_Float32::scale(), and Ogre::LinearResampler_Byte< channels >::scale().
|
inline |
Get the number of elements between one past the right bottom pixel of one slice and the left top pixel of the next slice.
(IE this is zero if slices are consecutive).
Referenced by Ogre::NearestResampler< elemsize >::scale(), Ogre::LinearResampler::scale(), and Ogre::LinearResampler_Float32::scale().
size_t Ogre::PixelBox::getSliceSkipAlwaysBytes | ( | ) | const |
Return a subvolume of this PixelBox.
def | Defines the bounds of the subregion to return |
resetOrigin | Whether to reset left/top/front of returned PixelBox to zero together with adjusting data pointer to compensate this, or do nothing so that returned PixelBox will have left/top/front of requested Box |
Exception(ERR_INVALIDPARAMS) | if def is not fully contained |
void * Ogre::PixelBox::getTopLeftFrontPixelPtr | ( | ) | const |
Return a data pointer pointing to top left front pixel of the pixel box.
Referenced by Ogre::NearestResampler< elemsize >::scale(), Ogre::LinearResampler::scale(), Ogre::LinearResampler_Float32::scale(), and Ogre::LinearResampler_Byte< channels >::scale().
|
inlineinherited |
Get the width of this box.
References Ogre::Box::left, and Ogre::Box::right.
Referenced by Ogre::NearestResampler< elemsize >::scale(), Ogre::LinearResampler::scale(), Ogre::LinearResampler_Float32::scale(), and Ogre::LinearResampler_Byte< channels >::scale().
bool Ogre::PixelBox::isConsecutive | ( | ) | const |
Return whether this buffer is laid out consecutive in memory (ie the pitches are equal to the dimensions)
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
operator new, with debug line info
placement operator new
|
inlineinherited |
|
inlineinherited |
array operator new, with debug line info
Set colour value at a certain location in the PixelBox.
The z coordinate is only valid for cubemaps and volume textures. This uses the first (largest) mipmap.
void Ogre::PixelBox::setConsecutive | ( | ) |
Set the rowPitch and slicePitch so that the buffer is laid out consecutive in memory.
Returns slicePitch, but always in bytes.
|
inherited |
|
inherited |
void* Ogre::PixelBox::data |
The data pointer.
PixelFormat Ogre::PixelBox::format |
The pixel format.
Referenced by Ogre::LinearResampler::scale(), and Ogre::LinearResampler_Float32::scale().
|
inherited |
|
inherited |
|
inherited |
size_t Ogre::PixelBox::rowPitch |
Number of elements between the leftmost pixel of one row and the left pixel of the next.
This value must always be equal to getWidth() (consecutive) for compressed formats.
Referenced by Ogre::NearestResampler< elemsize >::scale(), and Ogre::LinearResampler_Byte< channels >::scale().
size_t Ogre::PixelBox::slicePitch |
Number of elements between the top left pixel of one (depth) slice and the top left pixel of the next.
This can be a negative value. Must be a multiple of rowPitch. This value must always be equal to getWidth()*getHeight() (consecutive) for compressed formats.
Referenced by Ogre::NearestResampler< elemsize >::scale().
|
inherited |