#include <ImageNode.h>


Public Slots | |
| void | clearImageCache () |
| Clears the image cache by freeing all memory allocated for the cache. | |
Public Member Functions | |
| ImageNode (const QString &name, ParameterGroup *parameterRoot, bool cacheEnabled=true, const QString &outputImageName="Image") | |
| Constructor of the ImageNode class. | |
| virtual | ~ImageNode () |
| Destructor of the ImageNode class. | |
| virtual Ogre::TexturePtr | getImage () |
| Returns the image that is generated by this node. | |
| bool | isCached (int index) const |
| Returns whether a cached image is available for the frame with the given index. | |
| Ogre::Image * | getCachedImage (int index) const |
| Returns the image cached for the frame with the given index. | |
Static Public Attributes | |
| static const int | NumberUnknown = -1 |
| A constant value indicating that the number of images (to cache) is not known yet. | |
Protected Member Functions | |
| void | setNumberOfImagesToCache (unsigned int numberOfImagesToCache) |
| Sets the number of images to cache to the given value. | |
| Ogre::Image * | createImageFromTexture (Ogre::TexturePtr texturePointer) |
| Creates an image from the given texture. | |
| void | cacheImage (int index, Ogre::Image *image) |
| Stores the given image in the cache for the frame with the given index. | |
| void | setOutputImage (Ogre::Image *image) |
| Sets the given image as the output image in the output image parameter. | |
Protected Attributes | |
| bool | m_cacheEnabled |
| Flag that states whether the image cache for this node is enabled. | |
| bool | m_cacheInvalid |
| Flag that states whether the cache is invalid and should be cleared. | |
| QString | m_outputImageName |
| The name of the image output parameter. | |
| int | m_numberOfImagesToCache |
| The total number of images to cache. | |
| QMap< int, Ogre::Image * > | m_imageCache |
| The data structure to use for caching the loaded images. | |
Private Member Functions | |
| void | updateCacheStatus () |
| Updates the cache status. | |
| ImageNode::ImageNode | ( | const QString & | name, | |
| ParameterGroup * | parameterRoot, | |||
| bool | cacheEnabled = true, |
|||
| const QString & | outputImageName = "Image" | |||
| ) |
Constructor of the ImageNode class.
Constructors and Destructors.
| name | The name for the new node. | |
| parameterRoot | A copy of the parameter tree specific for the type of the node. | |
| cacheEnabled | Flag to enable or disable the image cache for this node. | |
| outputImageName | The name of the geometry output parameter. |
| name | The name for the new node. | |
| parameterRoot | A copy of the parameter tree specific for the type of the node. | |
| cacheEnabled | Flag to enable or disable the image cache for this node. | |
| outputImageName | The name of the geometry output parameter. |
| ImageNode::~ImageNode | ( | ) | [virtual] |
Destructor of the ImageNode class.
Defined virtual to guarantee that the destructor of a derived class will be called if the instance of the derived class is saved in a variable of its parent class type.
| Ogre::TexturePtr ImageNode::getImage | ( | ) | [virtual] |
Returns the image that is generated by this node.
Public Functions.
Reimplemented from ViewNode.
| bool ImageNode::isCached | ( | int | index | ) | const |
Returns whether a cached image is available for the frame with the given index.
| index | The index of the frame for which to test whether a cached image is available. |
| Ogre::Image * ImageNode::getCachedImage | ( | int | index | ) | const |
Returns the image cached for the frame with the given index.
| index | The index of the frame for which to return the cached image. |
| void ImageNode::clearImageCache | ( | ) | [slot] |
Clears the image cache by freeing all memory allocated for the cache.
Public Slots.
| void ImageNode::setNumberOfImagesToCache | ( | unsigned int | numberOfImagesToCache | ) | [protected] |
Sets the number of images to cache to the given value.
Protected Functions.
| numberOfImagesToCache | The number of images to cache. |
| numberOfImagesToCache | The number of images to cache. |
| Ogre::Image * ImageNode::createImageFromTexture | ( | Ogre::TexturePtr | texturePointer | ) | [protected] |
Creates an image from the given texture.
| texturePointer | The texture from which to copy the image data. |
| void ImageNode::cacheImage | ( | int | index, | |
| Ogre::Image * | image | |||
| ) | [protected] |
Stores the given image in the cache for the frame with the given index.
| index | The index of the frame for which to cache the image. | |
| image | The image to cache for the frame with the given index. |
| void ImageNode::setOutputImage | ( | Ogre::Image * | image | ) | [protected] |
Sets the given image as the output image in the output image parameter.
| image | The image containing the pixel data to use for the texture. |
| void ImageNode::updateCacheStatus | ( | ) | [private] |
Updates the cache status.
Private Functions.
const int ImageNode::NumberUnknown = -1 [static] |
A constant value indicating that the number of images (to cache) is not known yet.
bool ImageNode::m_cacheEnabled [protected] |
Flag that states whether the image cache for this node is enabled.
bool ImageNode::m_cacheInvalid [protected] |
Flag that states whether the cache is invalid and should be cleared.
QString ImageNode::m_outputImageName [protected] |
The name of the image output parameter.
int ImageNode::m_numberOfImagesToCache [protected] |
The total number of images to cache.
QMap<int, Ogre::Image *> ImageNode::m_imageCache [protected] |
The data structure to use for caching the loaded images.
The key for the map is the index of a frame.
1.5.9