CrystalSpace

Public API Reference

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>

Inherits scfImplementationExt0< csImageCubeMapMaker, csImageBase >.

List of all members.

Public Member Functions

 csImageCubeMapMaker ()
 Create a new map without faces set.
 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.
virtual const char * GetName () const
 Get the name of the 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< iImagecubeImages [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

anonymous enum [protected]
Enumerator:
NUM_FACES 

Symbolic name for number of faces of a cube map.

Definition at line 45 of file imagecubemapmaker.h.


Constructor & Destructor Documentation

csImageCubeMapMaker::csImageCubeMapMaker (  ) 

Create a new map without faces set.

csImageCubeMapMaker::csImageCubeMapMaker ( iImage source  ) 

Create a new map and copy the faces from source.

csImageCubeMapMaker::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.

images.


Member Function Documentation

void csImageCubeMapMaker::CheckImage ( int  index  )  [protected]

Ensure that the image at index is valid.

virtual const char* csImageCubeMapMaker::GetName (  )  const [inline, virtual]

Get the name of the image.

Remarks:
Unless the name was manually overridden with SetName(), the default name will contain the names of the wrapped subimages, separated by ':', in the form posx.png:negx.png:posy.png:negy.png:posz.png:negz.png.

Definition at line 90 of file imagecubemapmaker.h.

virtual void csImageCubeMapMaker::SetName ( const char *  iName  )  [virtual]

Set the name of the image.

void csImageCubeMapMaker::SetSubImage ( uint  num,
iImage image 
)

Set a specific face.

bool csImageCubeMapMaker::SubImageSet ( uint  num  )  [inline]

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.

void csImageCubeMapMaker::UpdateName (  )  [protected]

Update the image name from the contained images.


Member Data Documentation

csRef<iImage> csImageCubeMapMaker::cubeImages[NUM_FACES] [protected]

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:

Generated for Crystal Space 1.4.1 by doxygen 1.7.1