![]() |
Public API Reference |
Wrapper class to create a volume aka 3D texture from a number of 2D images as the volume slices. More...
#include <csgfx/imagevolumemaker.h>
Public Member Functions | |
| csImageVolumeMaker (int format=-1, int width=-1, int height=-1) | |
| Create a new map without slices set. | |
| csImageVolumeMaker (iImage *source) | |
| Create a new map and copy slices from source. | |
| virtual const uint8 * | GetAlpha () |
| Get alpha map for 8-bit paletted image. | |
| virtual int | GetDepth () const |
| Query image depth (only sensible when the image type is csimg3D) | |
| virtual int | GetFormat () const |
| Qyery image format (see CS_IMGFMT_XXX above) | |
| virtual int | GetHeight () const |
| Query image height. | |
| virtual const void * | GetImageData () |
| Get image data: returns either (csRGBpixel *) or (unsigned char *) depending on format. | |
| virtual csImageType | GetImageType () const |
| Get the type of the contained image. | |
| virtual const char * | GetName () const |
| Get the name of the image. | |
| virtual const csRGBpixel * | GetPalette () |
| Get image palette (or 0 if no palette) | |
| virtual csRef< iDataBuffer > | GetRawData () const |
| Get the raw data of the image (or 0 if raw data is not provided). | |
| virtual const char * | GetRawFormat () const |
| Get a string identifying the format of the raw data of the image (or 0 if raw data is not provided). | |
| virtual int | GetWidth () const |
| Query image width. | |
| virtual void | SetName (const char *iName) |
| Set the name of the image. | |
Protected Member Functions | |
| void | AppendPending () |
| Convert all added images to the right format and update data. | |
Protected Attributes | |
| uint8 * | alpha |
| Image alpha. | |
| void * | data |
| Image data. | |
| int | Depth |
| Depth of the image. | |
| int | Format |
| Format of the image. | |
| int | Height |
| Height of the image. | |
| bool | manualName |
| Whether the name was manually overridden (in this case it is not updated when the contained images are changed). | |
| csRGBpixel * | palette |
| Image palette. | |
| csRefArray< iImage > | pendingImages |
| Array of images that were added, but not yet processed into the image data. | |
| int | Width |
| Width of the image. | |
Wrapper class to create a volume aka 3D texture from a number of 2D images as the volume slices.
Definition at line 40 of file imagevolumemaker.h.
| csImageVolumeMaker::csImageVolumeMaker | ( | int | format = -1, |
| int | width = -1, |
||
| int | height = -1 |
||
| ) |
Create a new map without slices set.
Format, width, height are, unless specified, taken from the first image added.
| csImageVolumeMaker::csImageVolumeMaker | ( | iImage * | source | ) |
Create a new map and copy slices from source.
| void csImageVolumeMaker::AppendPending | ( | ) | [protected] |
Convert all added images to the right format and update data.
| virtual const uint8* csImageVolumeMaker::GetAlpha | ( | ) | [virtual] |
Get alpha map for 8-bit paletted image.
RGBA images contains alpha within themself. If image has no alpha map, or the image is in RGBA format, this function will return 0.
Reimplemented from csImageBase.
| virtual int csImageVolumeMaker::GetDepth | ( | ) | const [inline, virtual] |
Query image depth (only sensible when the image type is csimg3D)
Reimplemented from csImageBase.
Definition at line 90 of file imagevolumemaker.h.
| virtual int csImageVolumeMaker::GetFormat | ( | ) | const [virtual] |
Qyery image format (see CS_IMGFMT_XXX above)
Implements iImage.
| virtual int csImageVolumeMaker::GetHeight | ( | ) | const [inline, virtual] |
| virtual const void* csImageVolumeMaker::GetImageData | ( | ) | [virtual] |
Get image data: returns either (csRGBpixel *) or (unsigned char *) depending on format.
Note that for RGBA images the csRGBpixel structure contains the alpha channel as well, so GetAlpha (see below) method will return 0 (because alpha is not stored separately, as for paletted images).
Implements iImage.
| virtual csImageType csImageVolumeMaker::GetImageType | ( | ) | const [inline, virtual] |
Get the type of the contained image.
Reimplemented from csImageBase.
Definition at line 107 of file imagevolumemaker.h.
| virtual const char* csImageVolumeMaker::GetName | ( | ) | const [inline, virtual] |
Get the name of the image.
slice1.png:slice2.png:.... Reimplemented from csImageBase.
Definition at line 99 of file imagevolumemaker.h.
| virtual const csRGBpixel* csImageVolumeMaker::GetPalette | ( | ) | [virtual] |
Get image palette (or 0 if no palette)
Reimplemented from csImageBase.
| virtual csRef<iDataBuffer> csImageVolumeMaker::GetRawData | ( | ) | const [inline, virtual] |
Get the raw data of the image (or 0 if raw data is not provided).
Implements iImage.
Definition at line 106 of file imagevolumemaker.h.
| virtual const char* csImageVolumeMaker::GetRawFormat | ( | ) | const [inline, virtual] |
Get a string identifying the format of the raw data of the image (or 0 if raw data is not provided).
The format string must be compatible with that supported by iTextureManager::CreateTexture().
Implements iImage.
Definition at line 105 of file imagevolumemaker.h.
| virtual int csImageVolumeMaker::GetWidth | ( | ) | const [inline, virtual] |
| virtual void csImageVolumeMaker::SetName | ( | const char * | iName | ) | [virtual] |
Set the name of the image.
Reimplemented from csImageBase.
uint8* csImageVolumeMaker::alpha [protected] |
Image alpha.
Definition at line 68 of file imagevolumemaker.h.
void* csImageVolumeMaker::data [protected] |
Image data.
Definition at line 64 of file imagevolumemaker.h.
int csImageVolumeMaker::Depth [protected] |
Depth of the image.
Definition at line 59 of file imagevolumemaker.h.
int csImageVolumeMaker::Format [protected] |
Format of the image.
Definition at line 61 of file imagevolumemaker.h.
int csImageVolumeMaker::Height [protected] |
Height of the image.
Definition at line 57 of file imagevolumemaker.h.
bool csImageVolumeMaker::manualName [protected] |
Whether the name was manually overridden (in this case it is not updated when the contained images are changed).
Definition at line 48 of file imagevolumemaker.h.
csRGBpixel* csImageVolumeMaker::palette [protected] |
Image palette.
Definition at line 66 of file imagevolumemaker.h.
csRefArray<iImage> csImageVolumeMaker::pendingImages [protected] |
Array of images that were added, but not yet processed into the image data.
Definition at line 53 of file imagevolumemaker.h.
int csImageVolumeMaker::Width [protected] |
Width of the image.
Definition at line 55 of file imagevolumemaker.h.