Public Types | Static Public Member Functions | Public Attributes | Protected Member Functions

VgEngine::VgAnimationDescriptor Struct Reference

This class implements descriptors for animations. More...

Inheritance diagram for VgEngine::VgAnimationDescriptor:
Inheritance graph
[legend]
Collaboration diagram for VgEngine::VgAnimationDescriptor:
Collaboration graph
[legend]

List of all members.

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.

Detailed Description

This class implements descriptors for animations.

This is the set of parameters that will allow animation instantiation.


Member Typedef Documentation

This is the described type.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


Member Data Documentation

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.

Flag to set up a looping animation (default is no loop).

Version:
2.0.7729

The documentation for this struct was generated from the following file:
VisioDevKit 2.0, Visioglobe® 2013