Public Types | Public Member Functions | Protected Attributes | Friends

VgEngine::VgAnimation Class Reference

This interface handles engine animations. More...

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

List of all members.

Public Types

typedef VgAnimationDescriptor Descriptor

Public Member Functions

 VgAnimation ()
 This constructor initializes an useless empty animation instance.
virtual ~VgAnimation ()
 Class destructor.
void start (float pDelay=0.0f, float pStart=-1.0f, float pEnd=-1.0f, float pDuration=-1.0f)
 This method starts the animation.
void stop ()
 This method stops the animation and sets back the time value to 0.
void pause ()
 This method pauses the animation at it's current time value.
void seek (float pTime)
 This method sets the animation's current time and forces an injection of the animation values.
bool isPlaying () const
 This method retruns a boolean value that tells whether the animation is currently playing.
float getDuration () const
 This method returns the duration of the animation (in seconds).
float getCursor () const
 This method return the current cursor position in the animation's timeline.

Protected Attributes

Private * mPrivate

Friends

class VgInstanceFactory
class VgObjectBridge

Detailed Description

This interface handles engine animations.

Time management is done per-instance, this means that when the animation is started it applies to all objects using it.


Member Typedef Documentation


Constructor & Destructor Documentation

VgEngine::VgAnimation::VgAnimation (  )

This constructor initializes an useless empty animation instance.

To create an usable animation, animation descriptors (VgEngine::VgAnimationDescriptor) must be used and passed to the instance factory (VgEngine::VgInstanceFactory).

virtual VgEngine::VgAnimation::~VgAnimation (  ) [virtual]

Class destructor.


Member Function Documentation

float VgEngine::VgAnimation::getCursor (  ) const

This method return the current cursor position in the animation's timeline.

Returns:
The current animation's
float VgEngine::VgAnimation::getDuration (  ) const

This method returns the duration of the animation (in seconds).

Returns:
The animation's duration.
bool VgEngine::VgAnimation::isPlaying (  ) const

This method retruns a boolean value that tells whether the animation is currently playing.

Returns:
True if thae animation is playing, false if not.
void VgEngine::VgAnimation::pause (  )

This method pauses the animation at it's current time value.

Use start to resume animation playback, stop to reset the animation.

void VgEngine::VgAnimation::seek ( float  pTime )

This method sets the animation's current time and forces an injection of the animation values.

Parameters:
pTimeThe time value to set (will be clamped between 0 and duration)
void VgEngine::VgAnimation::start ( float  pDelay = 0.0f,
float  pStart = -1.0f,
float  pEnd = -1.0f,
float  pDuration = -1.0f 
)

This method starts the animation.

Parameters:
pDelayThe delay to apply before effectively playing the animation in seconds. Default is 0.0.
pStartThe start time in the animation in seconds (if negative, the animation starts at it's current poisition). Default is -1.0.
pEndThe targeted position in the animation (if negative, the animation ends when it's timeline ends). Default is -1.0.
pDurationThe time in seconds the animation will take to go from start to end (not including delay). If negative, means abs(end-start). Default is -1.0.
Note:
If start is greater than end, the animation will play backwards.
An animation that has looping (forward or ping pong) has a never ending timeline. Such an animation started with a negative value for pEnd will play continuously untill stopped explicitly.
void VgEngine::VgAnimation::stop (  )

This method stops the animation and sets back the time value to 0.


Friends And Related Function Documentation

friend class VgInstanceFactory [friend]
friend class VgObjectBridge [friend]

Member Data Documentation

Private* VgEngine::VgAnimation::mPrivate [protected]

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