#include <OgreImage.h>
Public Types | |
typedef Ogre::Box | Box |
typedef Ogre::Rect | Rect |
enum | Filter { FILTER_NEAREST, FILTER_LINEAR, FILTER_BILINEAR, FILTER_BOX, FILTER_TRIANGLE, FILTER_BICUBIC } |
Public Member Functions | |
Image () | |
Standard constructor. | |
Image (const Image &img) | |
Copy-constructor - copies all the data from the target image. | |
virtual | ~Image () |
Standard destructor. | |
Image & | operator= (const Image &img) |
Assignment operator - copies all the data from the target image. | |
Image & | flipAroundY () |
Flips (mirrors) the image around the Y-axis. | |
Image & | flipAroundX () |
Flips (mirrors) the image around the X-axis. | |
Image & | loadDynamicImage (uchar *pData, size_t uWidth, size_t uHeight, size_t depth, PixelFormat eFormat, bool autoDelete=false, size_t numFaces=1, size_t numMipMaps=0) |
Stores a pointer to raw data in memory. | |
Image & | loadDynamicImage (uchar *pData, size_t uWidth, size_t uHeight, PixelFormat eFormat) |
Stores a pointer to raw data in memory. | |
Image & | loadRawData (DataStreamPtr &stream, size_t uWidth, size_t uHeight, size_t uDepth, PixelFormat eFormat, size_t numFaces=1, size_t numMipMaps=0) |
Loads raw data from a stream. | |
Image & | loadRawData (DataStreamPtr &stream, size_t uWidth, size_t uHeight, PixelFormat eFormat) |
Loads raw data from a stream. | |
Image & | load (const String &strFileName, const String &groupName) |
Loads an image file. | |
Image & | load (DataStreamPtr &stream, const String &type) |
Loads an image file from a stream. | |
void | save (const String &filename) |
Save the image as a file. | |
uchar * | getData (void) |
Returns a pointer to the internal image buffer. | |
const uchar * | getData () const |
Returns a const pointer to the internal image buffer. | |
size_t | getSize () const |
Returns the size of the data buffer. | |
size_t | getNumMipmaps () const |
Returns the number of mipmaps contained in the image. | |
bool | hasFlag (const ImageFlags imgFlag) const |
Returns true if the image has the appropriate flag set. | |
size_t | getWidth (void) const |
Gets the width of the image in pixels. | |
size_t | getHeight (void) const |
Gets the height of the image in pixels. | |
size_t | getDepth (void) const |
Gets the depth of the image. | |
size_t | getNumFaces (void) const |
Get the numer of faces of the image. | |
size_t | getRowSpan (void) const |
Gets the physical width in bytes of each row of pixels. | |
PixelFormat | getFormat () const |
Returns the image format. | |
uchar | getBPP () const |
Returns the number of bits per pixel. | |
bool | getHasAlpha () const |
Returns true if the image has an alpha component. | |
ColourValue | getColourAt (int x, int y, int z) |
Get colour value from a certain location in the image. | |
PixelBox | getPixelBox (size_t face=0, size_t mipmap=0) const |
Get a PixelBox encapsulating the image data of a mipmap. | |
void | resize (ushort width, ushort height, Filter filter=FILTER_BILINEAR) |
Resize a 2D image, applying the appropriate filter. | |
Static Public Member Functions | |
void | applyGamma (uchar *buffer, Real gamma, size_t size, uchar bpp) |
Does gamma adjustment. | |
void | scale (const PixelBox &src, const PixelBox &dst, Filter filter=FILTER_BILINEAR) |
Scale a 1D, 2D or 3D image volume. | |
size_t | calculateSize (size_t mipmaps, size_t faces, size_t width, size_t height, size_t depth, PixelFormat format) |
Private Attributes | |
size_t | m_uWidth |
size_t | m_uHeight |
size_t | m_uDepth |
size_t | m_uSize |
size_t | m_uNumMipmaps |
int | m_uFlags |
PixelFormat | m_eFormat |
uchar | m_ucPixelSize |
uchar * | m_pBuffer |
bool | m_bAutoDelete |
Definition at line 52 of file OgreImage.h.
|
Definition at line 55 of file OgreImage.h. |
|
Definition at line 56 of file OgreImage.h. |
|
Definition at line 300 of file OgreImage.h. |
|
Standard constructor.
|
|
Copy-constructor - copies all the data from the target image.
|
|
Standard destructor.
|
|
Does gamma adjustment.
|
|
|
|
Flips (mirrors) the image around the X-axis.
|
|
Flips (mirrors) the image around the Y-axis.
|
|
Returns the number of bits per pixel.
|
|
Get colour value from a certain location in the image. The z coordinate is only valid for cubemaps and volume textures. This uses the first (largest) mipmap. |
|
Returns a const pointer to the internal image buffer.
|
|
Returns a pointer to the internal image buffer.
|
|
Gets the depth of the image.
|
|
Returns the image format.
|
|
Returns true if the image has an alpha component.
|
|
Gets the height of the image in pixels.
|
|
Get the numer of faces of the image. This is usually 6 for a cubemap, and 1 for a normal image. |
|
Returns the number of mipmaps contained in the image.
|
|
Get a PixelBox encapsulating the image data of a mipmap.
|
|
Gets the physical width in bytes of each row of pixels.
|
|
Returns the size of the data buffer.
|
|
Gets the width of the image in pixels.
|
|
Returns true if the image has the appropriate flag set.
|
|
Loads an image file from a stream.
|
|
Loads an image file.
|
|
Stores a pointer to raw data in memory. The pixel format has to be specified.
Definition at line 165 of file OgreImage.h. References Ogre::uchar. |
|
Stores a pointer to raw data in memory. The pixel format has to be specified.
|
|
Loads raw data from a stream. The pixel format has to be specified.
Definition at line 185 of file OgreImage.h. References Ogre::DataStreamPtr. |
|
Loads raw data from a stream. See the function loadDynamicImage for a description of the parameters.
|
|
Assignment operator - copies all the data from the target image.
|
|
Resize a 2D image, applying the appropriate filter.
|
|
Save the image as a file.
|
|
Scale a 1D, 2D or 3D image volume.
|
|
Definition at line 345 of file OgreImage.h. |
|
Definition at line 338 of file OgreImage.h. |
|
Definition at line 342 of file OgreImage.h. |
|
Definition at line 341 of file OgreImage.h. |
|
Definition at line 329 of file OgreImage.h. |
|
Definition at line 335 of file OgreImage.h. |
|
Definition at line 327 of file OgreImage.h. |
|
Definition at line 333 of file OgreImage.h. |
|
Definition at line 331 of file OgreImage.h. |
|
Definition at line 325 of file OgreImage.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:39:23 2006