Particle Universe  1.2
ParticleUniverse::AtlasImage Class Reference

#include <ParticleUniverseAtlasImage.h>

Public Member Functions

 AtlasImage (void)
 
virtual ~AtlasImage (void)
 
const bool getAlwaysUpdate (void) const
 
void setAlwaysUpdate (const bool alwaysUpdate)
 
bool addImage (const Ogre::Image *image)
 
const Ogre::ImagegetImage (void) const
 
void _compile (void)
 
void save (const String &filename)
 

Protected Types

typedef vector< Ogre::Image * > ImageList
 

Protected Attributes

ImageList mImageList
 
Ogre::ImagemAtlas
 
size_t mIndividualImageWidth
 
size_t mIndividualImageHeight
 
size_t mIndividualImageRowSpan
 
Ogre::PixelFormat mPixelFormat
 
bool mAlwaysUpdate
 

Detailed Description

The AtlasImage class offers the possibility to create one (atlas) image from other images.

Member Typedef Documentation

Constructor & Destructor Documentation

ParticleUniverse::AtlasImage::AtlasImage ( void  )
virtual ParticleUniverse::AtlasImage::~AtlasImage ( void  )
virtual

Member Function Documentation

void ParticleUniverse::AtlasImage::_compile ( void  )

Construct the atlas image from all added images.

Remarks
This internal method is called as soon as an image is added to the atlas, so it can be updated.
bool ParticleUniverse::AtlasImage::addImage ( const Ogre::Image image)

Add an Ogre Image to the atlas.

Remarks
All added images must have the same format. The AtlasImage tries to optimise its own image size.
Internally, a copy is made from each added image. This means that the AtlasImage class isnīt responsible for destruction of the the added image pointer.
const bool ParticleUniverse::AtlasImage::getAlwaysUpdate ( void  ) const

If true, the atlas image if recompiled after each change (i.e. an image is added).

Remarks
If false, compilation must be done manually (calling the _compile() function)
const Ogre::Image* ParticleUniverse::AtlasImage::getImage ( void  ) const

Get a pointer to the Ogre image of the atlas.

void ParticleUniverse::AtlasImage::save ( const String filename)

Save the atlas image as a file. The filename must include the extention (png, jpg)

void ParticleUniverse::AtlasImage::setAlwaysUpdate ( const bool  alwaysUpdate)

See getAlwaysUpdate

Member Data Documentation

bool ParticleUniverse::AtlasImage::mAlwaysUpdate
protected
Ogre::Image* ParticleUniverse::AtlasImage::mAtlas
protected
ImageList ParticleUniverse::AtlasImage::mImageList
protected
size_t ParticleUniverse::AtlasImage::mIndividualImageHeight
protected
size_t ParticleUniverse::AtlasImage::mIndividualImageRowSpan
protected
size_t ParticleUniverse::AtlasImage::mIndividualImageWidth
protected
Ogre::PixelFormat ParticleUniverse::AtlasImage::mPixelFormat
protected

The documentation for this class was generated from the following file: