#include <VisualAnimation.h>
Inherits VizKit::VisualAnimationComponent.

A VisualAnimation is constructed with an AnimatedProperty. With VisualActor::addAnimation() specific properies of an asset can be animated. A provided callback function is called for the time of the duration of the animation. The animation tries to reach the stop value in the amount of time set by the duration value.
typedef std::vector<double> VizKit::VisualAnimation::DebugHistory [private] |
Data entries stored for debug and monitoring purposes.
typedef DebugHistory::iterator VizKit::VisualAnimation::DebugHistoryIterator [private] |
The DebugHistoryIterator is an iterator of the DebugHistory.
enum VizKit::VisualAnimation::DurationSpeedConstraint [private] |
enum VizKit::VisualAnimation::VisualAnimationStatus [private] |
The possible status values of the VisualAnimation.
| VisualAnimation::VisualAnimation | ( | AnimatedProperty | theAnimatedProperty, | |
| bool | aDebugMode = false | |||
| ) |
Constructor.
| theAnimatedProperty | The property of the asset that is affected by the animation. | |
| aDebugMode | If true, the animation is in debug mode. |
| VisualAnimation::~VisualAnimation | ( | ) |
The destructor.
| VisualAnimation::VisualAnimation | ( | const VisualAnimation & | other | ) |
Copy constructor.
| other | Reference to another VisualAnimation. |
| void VisualAnimation::animate | ( | void | ) | [virtual] |
Executes the callback function to animate a property.
Implements VizKit::VisualAnimationComponent.
| uint32 VisualAnimation::calcDurationInMilliseconds | ( | double | aDistance, | |
| AnimationSpeed | aSpeed | |||
| ) | [static] |
Calculates the time an animation will take to travel a certain distance with a certain constant speed.
| aDistance | The distance of the values of the animation. | |
| aSpeed | Speed of the animation. |
| AnimationSpeed VisualAnimation::calcSpeed | ( | double | aDistance, | |
| uint32 | aDurationInMilliseconds | |||
| ) | [static] |
Calculates the speed of an animation of a certain distance and duration.
| aDistance | The distance of the values of the animation. | |
| aDurationInMilliseconds | Duration of the animation measured in milliseconds. |
| AnimationSpeed VisualAnimation::calcSpeed | ( | double | aStartValue, | |
| double | aStopValue, | |||
| uint32 | aDurationInMilliseconds | |||
| ) | [static] |
Calculates the speed of an animation if it would use the passed start and stop values with the provided duration time.
| aStartValue | A start value of an animation. | |
| aStopValue | A stop value of an animation. | |
| aDurationInMilliseconds | A duration of an animation measured in milliseconds. |
| VisualAnimationComponent * VisualAnimation::clone | ( | void | ) | const [virtual] |
Copies the current VisualAnimation and returns a pointer to a new VisualAnimation.
Implements VizKit::VisualAnimationComponent.
| void VisualAnimation::copy | ( | const VisualAnimation & | other | ) | [private] |
Copy method for assignment operator and copy constructor.
| other | Another VisualAnimation. |
| void VisualAnimation::decrementRemainingNumberOfRepeats | ( | void | ) | [private] |
Decrement the number of remaining repeats.
| void VisualAnimation::durationIsExceeded | ( | void | ) | [private] |
Internal method called when the duration time of the timeline did exceed.
| AnimatedProperty VisualAnimation::getAnimatedProperty | ( | void | ) | const [virtual] |
Returns the animated property of the animation.
Implements VizKit::VisualAnimationComponent.
| double VisualAnimation::getCurrentValue | ( | void | ) | const |
Returns the current value of the animation.
| uint32 VisualAnimation::getDurationInMilliseconds | ( | void | ) | const |
Returns the duration of the animation.
| const VisualAsset *const VisualAnimation::getEnclosingAsset | ( | void | ) | const [virtual] |
Returns the asset the animation has been added to.
Implements VizKit::VisualAnimationComponent.
| MovingDirection VisualAnimation::getMovingDirection | ( | void | ) | const |
Returns the moving direction (running direction) of the animation.
| RepeatMode VisualAnimation::getRepeatMode | ( | void | ) | const |
Returns the current repeat mode of the animation.
| AnimationSpeed VisualAnimation::getSpeed | ( | void | ) | const |
Returns the current speed of the animation.
| uint32 VisualAnimation::getStartDelayInMilliseconds | ( | void | ) | const |
Returns the number of milliseconds until the animation is supposed to actually start.
| double VisualAnimation::getStartValue | ( | void | ) | const |
Returns the start value of the animation.
| double VisualAnimation::getStopValue | ( | void | ) | const |
Returns the stop value of the animation.
| VisualAnimationComponent * VisualAnimation::getVisualAnimation | ( | const VisualItemIdentifier & | anAnimationIdentifier | ) | [virtual] |
Returns the VisualAnimation if the VisualItemIdentifier matches.
| anAnimationIdentifier | The identifier of the animation. |
Implements VizKit::VisualAnimationComponent.
| void VisualAnimation::handleOneCollectionItemAnimationDied | ( | void | ) | [virtual] |
Executes the appropriate action for the case that one animation of the current collection died.
Implements VizKit::VisualAnimationComponent.
| bool VisualAnimation::isReadyToDie | ( | void | ) | const [virtual] |
Answers the question whether the animation ended and is ready to be destroyed.
Implements VizKit::VisualAnimationComponent.
| bool VisualAnimation::isRunning | ( | void | ) | const [virtual] |
Answers the question whether the animation is (still) running.
Implements VizKit::VisualAnimationComponent.
| void VisualAnimation::notifyBeforeDeath | ( | void | ) | [virtual] |
Calls any callback functions right before the death of the animation component.
Implements VizKit::VisualAnimationComponent.
| VisualAnimation & VisualAnimation::operator= | ( | const VisualAnimation & | other | ) |
Assignment operator.
| other | Reference to another VisualAnimation. |
| void VisualAnimation::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 VisualAnimation::setAnimateCallbackFunctionPtr | ( | VisualAnimationAnimateCallback | theCallback, | |
| void * | someUserData = NULL | |||
| ) |
Sets the callback function that is repeatedly called in animation's duration time.
| theCallback | Pointer to c-style function (static class function). | |
| someUserData | Additional data (e.g. pointer to instance variable of initialized class). |
| void VisualAnimation::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 VisualAnimation::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 VisualAnimation::setCurrentTimelineValueToCurrentPropertyValue | ( | const VisualAsset & | visualAsset, | |
| AnimatedProperty | anAnimatedProperty | |||
| ) | [private] |
Internal method to adjust the current timeline value to the current value of the animated property.
| visualAsset | The asset where a property is animated. | |
| anAnimatedProperty | The animated property. |
| void VisualAnimation::setCurrentValue | ( | double | aCurrentValue | ) |
Sets the current value of the animation.
| aCurrentValue | The current value of the animation. |
| void VisualAnimation::setDebugMode | ( | bool | requestedDebugMode | ) |
Sets the debug mode.
| requestedDebugMode | The debug mode. True turns debug mode on, false turns it off. |
| void VisualAnimation::setDurationInMilliseconds | ( | uint32 | numberOfMilliseconds | ) |
Sets the duration of the animation.
| numberOfMilliseconds | The number of milliseconds the animation spans. |
| void VisualAnimation::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 VisualAnimation::setInterpolationType | ( | InterpolationType | anInterpolationType | ) |
Sets the type of interpolation.
| anInterpolationType | The requested type of interpolation. |
Sets the loop mode of the animation.
| aLoopMode | The requested loop mode. | |
| requestedNumberOfLoops | The number of times the animation should be repeated (default = 1). |
| void VisualAnimation::setSpeed | ( | AnimationSpeed | animationSpeed | ) |
Sets the speed of the animation.
| animationSpeed | The speed of the animation (as it has been calculated by static function VisualAnimation::calcSpeed()); |
| void VisualAnimation::setStartDelayInMilliseconds | ( | uint32 | aStartDelayInMilliseconds | ) |
Sets the number of milliseconds until the animation actually starts.
| aStartDelayInMilliseconds | The number of milliseconds until the animation actually starts. |
| void VisualAnimation::setStartValue | ( | const VisualStagePosition & | aPosition, | |
| bool | startAnimationWithCurrentPropertyValue = false | |||
| ) |
Sets the start value of the animation.
| aPosition | The start value of the animation as position. | |
| startAnimationWithCurrentPropertyValue | If true, the animation starts with the current value of the animated property. Default is false as it is assumed that a set start value is meant to act as value to start the animation with. |
| void VisualAnimation::setStartValue | ( | double | aStartValue, | |
| bool | startAnimationWithCurrentPropertyValue = false | |||
| ) |
Sets the start value of the animation.
| aStartValue | The start value of the animation. | |
| startAnimationWithCurrentPropertyValue | If true, the animation starts with the current value of the animated property. Default is false as it is assumed that a set start value is meant to act as value to start the animation with. |
| void VisualAnimation::setStopValue | ( | double | aStopValue | ) |
Sets the stop value of the animation.
| aStopValue | The stop value of the animation. |
| void VisualAnimation::setStopValue | ( | const VisualStagePosition & | aPosition | ) |
Sets the stop value of the animation.
| aPosition | The stop value of the animation as position. |
| void VisualAnimation::start | ( | void | ) | [virtual] |
Starts the Animation.
Implements VizKit::VisualAnimationComponent.
| void VisualAnimation::stop | ( | void | ) | [virtual] |
Stops the Animation.
Implements VizKit::VisualAnimationComponent.
| void VisualAnimation::update | ( | void | ) | [virtual] |
Updates the state of the animation.
Implements VizKit::VisualAnimationComponent.
The callback function that is called during the animation.
The property of the asset that is affected by the animation.
void* VizKit::VisualAnimation::animationUserData [private] |
Internally stored pointer to provided user data (e.g. pointer to instance variable of initialized class).
The optional identifier of the collection of the animation (the cluster resp. sequence the current animation is part of).
The current entry of the debug history.
The data entries stored for debug and monitoring purposes.
bool VizKit::VisualAnimation::debugHistoryIsInitialized [private] |
True if the maximum number of data entries of debugHistory are initialized, false otherwise.
bool VizKit::VisualAnimation::debugMode [private] |
True if in debug mode, false otherwise.
True if the animation is supposed to start with the current value of the animated property. Default is true. By calling setStartValue() it is usually set to false.
The constraint of the animation (whether bound to speed or duration).
const VisualAsset* VizKit::VisualAnimation::enclosingAsset [private] |
The asset the animation has been added to.
const uint32 VisualAnimation::maxNumberOfDebugHistoryEntries = 700 [static, private] |
The maximum number of data entries stored in history for debug and monitoring purposes.
VisualAnimationPerformAnyAdditionalActionCallback VizKit::VisualAnimation::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 remaining number of times the animation should pass.
AnimationSpeed VizKit::VisualAnimation::speed [private] |
The speed of the animation (the speed is driving value in case no start value has been set).
The number of milliseconds until the animation will be actually used by VisualStageControl.
double VizKit::VisualAnimation::startValue [private] |
The start value of the animation as it has been set by setStartValue().
The start value of the animation as it has been set by setStartValue(), with data type VisualStagePosition.
The status of the VisualAnimation.
double VizKit::VisualAnimation::stopValue [private] |
The stop value of the animation as it has been set by setStopValue().
The stop value of the animation as it has been set by setStopValue(), with data type VisualStagePosition.
The pointer to the timeline of the animation.
The optional callback function that is called right before the death of the animation cluster.
void* VizKit::VisualAnimation::willDieCallbackUserData [private] |
The optional user data that is passed to callback function that is called right before the death of the animation cluster.