Site Hosted by: Logo

Support This Project

ad::AnimPlayer Class Reference

Plays animations. More...

#include <animation.h>

Inherits ad::BlendBase.

Inheritance diagram for ad::AnimPlayer:

Inheritance graph
Collaboration diagram for ad::AnimPlayer:

Collaboration graph
List of all members.

Public Member Functions

 AnimPlayer (Anim *anim, float startTime=0)
 Create an AnimPlayer from loaded animation data.
 ~AnimPlayer ()
 Destroy the AnimPlayer.
void SetFrame (float frametime)
 Jump to a specific tiem in the animation.
float GetFrame ()
 Get the current frame.
void Update (float time)
 Update the animation some time in seconds.
void Calculate (Pose *out_pose, HiBoneMask *optionalMask=0)
 Calculate a pose at the current state.

Public Attributes


Detailed Description

Plays animations.

Needed to play a single instance of an animation at different frames. This function inherits BlendBase and will calculate the pose by interpolating the values at the time between two frames of an animation. Like any BlendBase::Calculate() function, a HiBoneMask can be used to calculate the pose for a subset of the skeleton.

See also:
ad::BlendBase, ad::Blend, ad::HiBoneMask

Constructor & Destructor Documentation

ad::AnimPlayer::AnimPlayer Anim anim,
float  startTime = 0

Create an AnimPlayer from loaded animation data.

anim A pointer to a loaded animation. The AnimPlayer keeps this pointer as a reference to the animation data.
startTime Optional parameter. Initializes the AnimPlayer to a certain tim (in seconds) into the animation.

Member Function Documentation

void ad::AnimPlayer::Calculate Pose out_pose,
HiBoneMask optionalMask = 0

Calculate a pose at the current state.

out_pose A pointer to an allocated pose. If there is a selection mask, only the bones selected will be written to. The bones not selected will not be changed in this pose.

Implements ad::BlendBase.

float ad::AnimPlayer::GetFrame  ) 

Get the current frame.

The decimal part is between frames (intuitively), so for example, 6.25 is between frame 6 and 7, it's 25% of the way from frame 6 to frame 7.

The documentation for this class was generated from the following files:

© Copyright 2005 John Butterfield.
All Rights Reserved.