VizKit
3.3.7
|
A VisualAnimationCluster is a collection of animations where the animations run concurrently. More...
#include <VisualAnimationCluster.h>
Public Member Functions | |
VisualAnimationCluster () | |
The constructor. | |
~VisualAnimationCluster () | |
The destructor. | |
VisualAnimationCluster (const VisualAnimationCluster &other) | |
Copy constructor. | |
VisualAnimationCluster & | operator= (const VisualAnimationCluster &other) |
Assignment operator. | |
virtual VisualAnimationComponent * | clone (void) const |
Copies the current VisualAnimationCluster and returns a pointer to a new VisualAnimationCluster. | |
void | add (VisualAnimationComponent &anAnimation) |
Adds an animation to the collection. | |
virtual void | animate (void) |
Executes the callback function to animate a property. | |
virtual void | update (void) |
Updates the state of the animation cluster. | |
virtual bool | isRunning (void) const |
Answers the question whether at least one animation is (still) running. | |
virtual bool | isReadyToDie (void) const |
Answers the question whether the animation ended and is ready to be destroyed. | |
virtual void | start (void) |
Starts the Animation collection. | |
virtual void | stop (void) |
Stops the Animation collection. | |
virtual AnimatedProperty | getAnimatedProperty (void) const |
Returns the animated property of the animation. | |
virtual void | preparePriorToAddingToAsset (VisualAsset &visualAsset) |
Prepares the animation before it is added to an asset. | |
virtual const VisualAsset *const | getEnclosingAsset (void) const |
Returns the asset the animation has been added to. | |
virtual void | setIdentifierOfParentCollection (const VisualItemIdentifier &aCollectionIdentifier) |
Sets the identifier of the parent collection (the collection which the current animation is part of). | |
virtual void | handleOneCollectionItemAnimationDied (void) |
Executes the appropriate action for the case that one animation of the current collection died. | |
virtual void | setCallbackToPerformAnyAdditionalAction (VisualAnimationPerformAnyAdditionalActionCallback theCallback, void *userData=NULL) |
Sets the callback function that is repeatedly called back during animation component's duration time. | |
virtual void | setCallbackToNotifyBeforeDeath (VisualAnimationWillDieCallback theCallback, void *userData=NULL) |
Sets the callback function that is called right before the death of the animation component. | |
virtual void | notifyBeforeDeath (void) |
Calls any callback functions right before the death of the animation component. | |
virtual VisualAnimationComponent * | getVisualAnimation (const VisualItemIdentifier &anAnimationIdentifier) |
Returns the VisualAnimation with the specified VisualItemIdentifier. | |
Private Types | |
typedef std::vector < VisualAnimationComponent * > | AnimationVector |
Animations are collected as a vector of pointers to VisualAnimationComponents. | |
typedef AnimationVector::iterator | AnimationVectorIterator |
The AnimationVectorIterator is an iterator of a AnimationVector. | |
typedef AnimationVector::const_iterator | AnimationVectorConstIterator |
The AnimationVectorConstIterator is a const iterator of a AnimationVector. | |
Private Member Functions | |
void | copy (const VisualAnimationCluster &other) |
Copy method for assignment operator and copy constructor. | |
Private Attributes | |
AnimationVector | animationVector |
The vector of animations. | |
VisualItemIdentifier * | parentCollectionIdentifier |
The optional identifier of the parent collection of the cluster (the cluster resp. | |
const VisualAsset * | enclosingAsset |
The asset the animation has been added to. | |
VisualAnimationPerformAnyAdditionalActionCallback | performAnyAdditionalActionCallback |
The optional callback function that is called during the animation. | |
void * | performAnyAdditionalActionCallbackUserData |
The optional user data that is passed to callback function that is called during the animation. | |
VisualAnimationWillDieCallback | willDieCallback |
The optional callback function that is called right before the death of the animation cluster. | |
void * | willDieCallbackUserData |
The optional user data that is passed to callback function that is called right before the death of the animation cluster. |
A VisualAnimationCluster is a collection of animations where the animations run concurrently.
Animations are added by calling add().
typedef std::vector<VisualAnimationComponent*> VizKit::VisualAnimationCluster::AnimationVector [private] |
Animations are collected as a vector of pointers to VisualAnimationComponents.
typedef AnimationVector::const_iterator VizKit::VisualAnimationCluster::AnimationVectorConstIterator [private] |
The AnimationVectorConstIterator is a const iterator of a AnimationVector.
typedef AnimationVector::iterator VizKit::VisualAnimationCluster::AnimationVectorIterator [private] |
The AnimationVectorIterator is an iterator of a AnimationVector.
The constructor.
The destructor.
VisualAnimationCluster::VisualAnimationCluster | ( | const VisualAnimationCluster & | other | ) |
Copy constructor.
other | Reference to another VisualAnimationCluster. |
void VisualAnimationCluster::add | ( | VisualAnimationComponent & | anAnimation | ) |
Adds an animation to the collection.
anAnimation | Reference to an animation (single VisualAnimation or clustered/sequenced composite collection of multiple VisualAnimations). |
void VisualAnimationCluster::animate | ( | void | ) | [virtual] |
Executes the callback function to animate a property.
Implements VizKit::VisualAnimationComponent.
VisualAnimationComponent * VisualAnimationCluster::clone | ( | void | ) | const [virtual] |
Copies the current VisualAnimationCluster and returns a pointer to a new VisualAnimationCluster.
Implements VizKit::VisualAnimationComponent.
void VisualAnimationCluster::copy | ( | const VisualAnimationCluster & | other | ) | [private] |
Copy method for assignment operator and copy constructor.
other | Another VisualAnimationCluster. |
AnimatedProperty VisualAnimationCluster::getAnimatedProperty | ( | void | ) | const [virtual] |
Returns the animated property of the animation.
Implements VizKit::VisualAnimationComponent.
const VisualAsset *const VisualAnimationCluster::getEnclosingAsset | ( | void | ) | const [virtual] |
Returns the asset the animation has been added to.
Implements VizKit::VisualAnimationComponent.
VisualAnimationComponent * VisualAnimationCluster::getVisualAnimation | ( | const VisualItemIdentifier & | anAnimationIdentifier | ) | [virtual] |
Returns the VisualAnimation with the specified VisualItemIdentifier.
anAnimationIdentifier | The identifier of the animation. |
Implements VizKit::VisualAnimationComponent.
void VisualAnimationCluster::handleOneCollectionItemAnimationDied | ( | void | ) | [virtual] |
Executes the appropriate action for the case that one animation of the current collection died.
Implements VizKit::VisualAnimationComponent.
bool VisualAnimationCluster::isReadyToDie | ( | void | ) | const [virtual] |
Answers the question whether the animation ended and is ready to be destroyed.
Implements VizKit::VisualAnimationComponent.
bool VisualAnimationCluster::isRunning | ( | void | ) | const [virtual] |
Answers the question whether at least one animation is (still) running.
Implements VizKit::VisualAnimationComponent.
void VisualAnimationCluster::notifyBeforeDeath | ( | void | ) | [virtual] |
Calls any callback functions right before the death of the animation component.
Implements VizKit::VisualAnimationComponent.
VisualAnimationCluster & VisualAnimationCluster::operator= | ( | const VisualAnimationCluster & | other | ) |
Assignment operator.
other | Reference to another VisualAnimationCluster. |
void VisualAnimationCluster::preparePriorToAddingToAsset | ( | VisualAsset & | visualAsset | ) | [virtual] |
Prepares the animation before it is added to an asset.
visualAsset | The asset the animation is supposed to be added to.. |
Implements VizKit::VisualAnimationComponent.
void VisualAnimationCluster::setCallbackToNotifyBeforeDeath | ( | VisualAnimationWillDieCallback | theCallback, |
void * | userData = NULL |
||
) | [virtual] |
Sets the callback function that is called right before the death of the animation component.
theCallback | Pointer to c-style function (static class function). |
userData | Additional data (e.g. pointer to instance variable of initialized class). |
Implements VizKit::VisualAnimationComponent.
void VisualAnimationCluster::setCallbackToPerformAnyAdditionalAction | ( | VisualAnimationPerformAnyAdditionalActionCallback | theCallback, |
void * | userData = NULL |
||
) | [virtual] |
Sets the callback function that is repeatedly called back during animation component's duration time.
theCallback | Pointer to c-style function (static class function). |
userData | Additional data (e.g. pointer to instance variable of initialized class). |
Implements VizKit::VisualAnimationComponent.
void VisualAnimationCluster::setIdentifierOfParentCollection | ( | const VisualItemIdentifier & | aCollectionIdentifier | ) | [virtual] |
Sets the identifier of the parent collection (the collection which the current animation is part of).
aCollectionIdentifier | The identifier of the parent collection. |
Implements VizKit::VisualAnimationComponent.
void VisualAnimationCluster::start | ( | void | ) | [virtual] |
Starts the Animation collection.
Implements VizKit::VisualAnimationComponent.
void VisualAnimationCluster::stop | ( | void | ) | [virtual] |
Stops the Animation collection.
Implements VizKit::VisualAnimationComponent.
void VisualAnimationCluster::update | ( | void | ) | [virtual] |
Updates the state of the animation cluster.
Implements VizKit::VisualAnimationComponent.
The vector of animations.
const VisualAsset* VizKit::VisualAnimationCluster::enclosingAsset [private] |
The asset the animation has been added to.
The optional identifier of the parent collection of the cluster (the cluster resp.
sequence the current cluster is part of).
VisualAnimationPerformAnyAdditionalActionCallback VizKit::VisualAnimationCluster::performAnyAdditionalActionCallback [private] |
The optional callback function that is called during the animation.
The optional user data that is passed to callback function that is called during the animation.
The optional callback function that is called right before the death of the animation cluster.
void* VizKit::VisualAnimationCluster::willDieCallbackUserData [private] |
The optional user data that is passed to callback function that is called right before the death of the animation cluster.