csImageCubeMapMaker Class Reference
[Graphics]
Wrapper class to create a cube map from a number of 2D images as the cube faces.
More...
#include <csgfx/imagecubemapmaker.h>
Inheritance diagram for csImageCubeMapMaker:

Public Member Functions | |
csImageCubeMapMaker (iImage *posX, iImage *negX, iImage *posY, iImage *negY, iImage *posZ, iImage *negZ) | |
Create a new map from separately specified Positive X, Positive Y etc. | |
csImageCubeMapMaker (iImage *source) | |
Create a new map and copy the faces from source. | |
csImageCubeMapMaker () | |
Create a new map without faces set. | |
virtual const uint8 * | GetAlpha () |
Get alpha map for 8-bit paletted image. | |
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 void | GetKeyColor (int &, int &, int &) const |
Get the keycolour stored with the image. | |
virtual csRef< iImage > | GetMipmap (uint num) |
Return a precomputed mipmap. | |
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 csRef< iImage > | GetSubImage (uint num) |
Query a sub image. | |
virtual int | GetWidth () const |
Query image width. | |
virtual bool | HasKeyColor () const |
Check if image has a keycolour stored with it. | |
virtual uint | HasMipmaps () const |
Returns the number of mipmaps contained in the image (in case there exist any precalculated mipmaps), in addition to the original image. | |
virtual uint | HasSubImages () const |
Returns the number of sub images, in addition to this image. | |
virtual void | SetName (const char *iName) |
Set the name of the image. | |
void | SetSubImage (uint num, iImage *image) |
Set a specific face. | |
bool | SubImageSet (uint num) |
Check whether a face is specified. | |
Protected Types | |
enum | { NUM_FACES = 6 } |
Protected Member Functions | |
void | CheckImage (int index) |
Ensure that the image at index is valid. | |
void | UpdateName () |
Update the image name from the contained images. | |
Protected Attributes | |
csRef< iImage > | cubeImages [NUM_FACES] |
The cube face images. | |
bool | manualName |
Whether the name was manually overridden (in this case it is not updated when the contained images are changed). |
Detailed Description
Wrapper class to create a cube map from a number of 2D images as the cube faces.Ensures that all faces are available when requested, if necessary by creating a new image (the famous and popular image-not-found checkerboard).
Definition at line 41 of file imagecubemapmaker.h.
Member Enumeration Documentation
|
Definition at line 45 of file imagecubemapmaker.h. |
Constructor & Destructor Documentation
|
Create a new map without faces set.
|
|
Create a new map and copy the faces from source.
|
|
Create a new map from separately specified Positive X, Positive Y etc. images. |
Member Function Documentation
|
Ensure that the image at index is valid.
|
|
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. |
|
Qyery image format (see CS_IMGFMT_XXX above).
Implements iImage. |
|
Query image height.
Implements iImage. |
|
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. |
|
Get the type of the contained image.
Reimplemented from csImageBase. Definition at line 104 of file imagecubemapmaker.h. References csimgCube. |
|
Get the keycolour stored with the image.
Reimplemented from csImageBase. Definition at line 97 of file imagecubemapmaker.h. |
|
Return a precomputed mipmap. num specifies which mipmap to return; 0 returns the original image, num <= the return value of HasMipmaps() returns that mipmap. Reimplemented from csImageBase. |
|
Get the name of the image.
Reimplemented from csImageBase. Definition at line 90 of file imagecubemapmaker.h. |
|
Get image palette (or 0 if no palette).
Reimplemented from csImageBase. |
|
Get the raw data of the image (or 0 if raw data is not provided).
Reimplemented from csImageBase. |
|
Get a string identifying the format of the raw data of the image (or 0 if raw data is not provided).
Reimplemented from csImageBase. |
|
Query a sub image. A value of 0 for num returns the original image, a value larger or equal than the return value of HasSubImages() returns that sub image, any other value returns 0. Reimplemented from csImageBase. |
|
Query image width.
Implements iImage. |
|
Check if image has a keycolour stored with it.
Reimplemented from csImageBase. Definition at line 96 of file imagecubemapmaker.h. |
|
Returns the number of mipmaps contained in the image (in case there exist any precalculated mipmaps), in addition to the original image. 0 means there are no precomputed mipmaps. Reimplemented from csImageBase. |
|
Returns the number of sub images, in addition to this image. Subimages are usually used for cube map faces. Reimplemented from csImageBase. Definition at line 105 of file imagecubemapmaker.h. |
|
Set the name of the image.
Reimplemented from csImageBase. |
|
Set a specific face.
|
|
Check whether a face is specified. The difference from GetSubImage(num) is that GetSubImage() will always return an image != 0, while SubImageSet() checks whether the internal face reference is 0 or not. Definition at line 116 of file imagecubemapmaker.h. |
|
Update the image name from the contained images.
|
Member Data Documentation
|
The cube face images.
Definition at line 51 of file imagecubemapmaker.h. |
|
Whether the name was manually overridden (in this case it is not updated when the contained images are changed).
Definition at line 56 of file imagecubemapmaker.h. |
The documentation for this class was generated from the following file:
- csgfx/imagecubemapmaker.h
Generated for Crystal Space by doxygen 1.4.6