This class implements descriptors for animations. More...
Public Types | |
typedef VgAnimation | Described |
This is the described type. | |
Static Public Member Functions | |
static VgEngine::VgRefPtr < VgAnimationDescriptor > | create () |
This static method returns a new heap-allocated descriptor. | |
Public Attributes | |
VgEngine::VgFunctorDescriptorMap | mFunctorDescriptors |
This map associates a spatial (by name) an animation target (by name) and a functor descriptor that will be used to instantiate the real functors. | |
float | mDuration |
Animation duration in seconds (default is 1 second). | |
unsigned int | mLoopMode |
Flag to set up a looping animation (default is no loop). | |
VgEngine::VgRefPtr < VgEngine::VgIAnimationCallback > | mCallback |
Pointer to the callback to notify when the animation finishes. | |
Protected Member Functions | |
VgAnimationDescriptor () | |
This constructor will initialize an empty animation descriptor (no channel functor). | |
~VgAnimationDescriptor () | |
It does not delete the callback nor the functor descriptors. |
This class implements descriptors for animations.
This is the set of parameters that will allow animation instantiation.
This is the described type.
VgEngine::VgAnimationDescriptor::VgAnimationDescriptor | ( | ) | [protected] |
This constructor will initialize an empty animation descriptor (no channel functor).
VgEngine::VgAnimationDescriptor::~VgAnimationDescriptor | ( | ) | [protected] |
It does not delete the callback nor the functor descriptors.
It is the caller's responsibility to release the callbacks and the functor descriptors, they are not reference-counted.
static VgEngine::VgRefPtr< VgAnimationDescriptor > VgEngine::VgAnimationDescriptor::create | ( | ) | [static] |
This static method returns a new heap-allocated descriptor.
It is the only method that should be used to instantiate new descriptors. It is a way to make sure no one will delete it, except the last VgRefPtr pointing to it.
Pointer to the callback to notify when the animation finishes.
The caller must free this pointer, the animation must be stopped and deleted before freeing the callback. If the mLoop flag is true, this callback will never get called, since the animation never finishes.
Animation duration in seconds (default is 1 second).
This map associates a spatial (by name) an animation target (by name) and a functor descriptor that will be used to instantiate the real functors.
If the spatial's name is empty, it means it is the spatial hosting the animation. Standard target names are "position", "orientation", ... (see When a functor descriptor is added to this map, the ownership is left to the caller. It is the caller responsibility to delete it after animation instantiation.
unsigned int VgEngine::VgAnimationDescriptor::mLoopMode |
Flag to set up a looping animation (default is no loop).