DigitalSpaces::DIOGREAnimation Struct Reference
[Ogre]

#include <OGREInterfaces.h>

Inherits DigitalSpaces::DIObjectBase.


Public Member Functions

const char * GetName (void)
 Gets the name of this animation.
float GetLength (void)
 Gets the total length of the animation.
DIOGRENodeAnimationTrackCreateNodeTrack (unsigned short handle)
 Creates an AnimationTrack.
DIOGRENodeAnimationTrackCreateNodeTrack (unsigned short handle, DIOGRENode *node)
 Creates a new AnimationTrack automatically associated with a Node.
unsigned short GetNumNodeTracks (void)
 Gets the number of AnimationTrack objects which make up this animation.
DIOGRENodeAnimationTrackGetNodeTrack (unsigned short handle)
 Gets a track by it's handle.
void DestroyNodeTrack (unsigned short handle)
 Destroys the track with the given handle.
void DestroyAllNodeTracks (void)
 Removes and destroys all tracks making up this animation.
void Apply (float timePos, float weight=1.0, float scale=1.0f)
 Applies an animation given a specific time point and weight.
void Apply (DigitalSpaces::DIOGRESkeleton *skeleton, float timePos, float weight=1.0, float scale=1.0f)
 Applies an animation given a specific time point and weight to a given skeleton.
void SetInterpolationMode (OGREInterpolationMode im)
 Tells the animation how to interpolate between keyframes.
OGREInterpolationMode GetInterpolationMode (void)
 Gets the current interpolation mode of this animation.
void SetRotationInterpolationMode (OGRERotationInterpolationMode im)
 Tells the animation how to interpolate rotations.
OGRERotationInterpolationMode GetRotationInterpolationMode (void)
 Gets the current rotation interpolation mode of this animation.
void SetDefaultInterpolationMode (OGREInterpolationMode im)
 Sets the default animation interpolation mode.
OGREInterpolationMode GetDefaultInterpolationMode (void)
 Gets the default interpolation mode for all animations.
void SetDefaultRotationInterpolationMode (OGRERotationInterpolationMode im)
 Sets the default rotation interpolation mode.
OGRERotationInterpolationMode GetDefaultRotationInterpolationMode (void)
 Gets the default rotation interpolation mode for all animations.
void Optimise (void)
 Fast access to NON-UPDATEABLE track list.

Member Function Documentation

const char* DigitalSpaces::DIOGREAnimation::GetName ( void   ) 

Gets the name of this animation.

float DigitalSpaces::DIOGREAnimation::GetLength ( void   ) 

Gets the total length of the animation.

DIOGRENodeAnimationTrack* DigitalSpaces::DIOGREAnimation::CreateNodeTrack ( unsigned short  handle  ) 

Creates an AnimationTrack.

Parameters:
handle Numeric handle to give the track, used for accessing the track later. Must be unique within this Animation.

DIOGRENodeAnimationTrack* DigitalSpaces::DIOGREAnimation::CreateNodeTrack ( unsigned short  handle,
DIOGRENode node 
)

Creates a new AnimationTrack automatically associated with a Node.

Remarks:
This method creates a standard AnimationTrack, but also associates it with a target Node which will receive all keyframe effects.
Parameters:
handle Numeric handle to give the track, used for accessing the track later. Must be unique within this Animation.
node A pointer to the Node object which will be affected by this track

unsigned short DigitalSpaces::DIOGREAnimation::GetNumNodeTracks ( void   ) 

Gets the number of AnimationTrack objects which make up this animation.

DIOGRENodeAnimationTrack* DigitalSpaces::DIOGREAnimation::GetNodeTrack ( unsigned short  handle  ) 

Gets a track by it's handle.

void DigitalSpaces::DIOGREAnimation::DestroyNodeTrack ( unsigned short  handle  ) 

Destroys the track with the given handle.

void DigitalSpaces::DIOGREAnimation::DestroyAllNodeTracks ( void   ) 

Removes and destroys all tracks making up this animation.

void DigitalSpaces::DIOGREAnimation::Apply ( float  timePos,
float  weight = 1.0,
float  scale = 1.0f 
)

Applies an animation given a specific time point and weight.

Remarks:
Where you have associated animation tracks with Node objects, you can eaily apply an animation to those nodes by calling this method.
Parameters:
timePos The time position in the animation to apply.
weight The influence to give to this track, 1.0 for full influence, less to blend with other animations.
scale The scale to apply to translations and scalings, useful for adapting an animation to a different size target.

void DigitalSpaces::DIOGREAnimation::Apply ( DigitalSpaces::DIOGRESkeleton skeleton,
float  timePos,
float  weight = 1.0,
float  scale = 1.0f 
)

Applies an animation given a specific time point and weight to a given skeleton.

Remarks:
Where you have associated animation tracks with Node objects, you can eaily apply an animation to those nodes by calling this method.
Parameters:
timePos The time position in the animation to apply.
weight The influence to give to this track, 1.0 for full influence, less to blend with other animations.
scale The scale to apply to translations and scalings, useful for adapting an animation to a different size target.

void DigitalSpaces::DIOGREAnimation::SetInterpolationMode ( OGREInterpolationMode  im  ) 

Tells the animation how to interpolate between keyframes.

Remarks:
By default, animations normally interpolate linearly between keyframes. This is fast, but when animations include quick changes in direction it can look a little unnatural because directions change instantly at keyframes. An alternative is to tell the animation to interpolate along a spline, which is more expensive in terms of calculation time, but looks smoother because major changes in direction are distributed around the keyframes rather than just at the keyframe.
You can also change the default animation behaviour by calling Animation::setDefaultInterpolationMode.

OGREInterpolationMode DigitalSpaces::DIOGREAnimation::GetInterpolationMode ( void   ) 

Gets the current interpolation mode of this animation.

Remarks:
See setInterpolationMode for more info.

void DigitalSpaces::DIOGREAnimation::SetRotationInterpolationMode ( OGRERotationInterpolationMode  im  ) 

Tells the animation how to interpolate rotations.

Remarks:
By default, animations interpolate lieanrly between rotations. This is fast but not necessarily completely accurate. If you want more accurate interpolation, use spherical interpolation, but be aware that it will incur a higher cost.
You can also change the default rotation behaviour by calling Animation::setDefaultRotationInterpolationMode.

OGRERotationInterpolationMode DigitalSpaces::DIOGREAnimation::GetRotationInterpolationMode ( void   ) 

Gets the current rotation interpolation mode of this animation.

Remarks:
See setRotationInterpolationMode for more info.

void DigitalSpaces::DIOGREAnimation::SetDefaultInterpolationMode ( OGREInterpolationMode  im  ) 

Sets the default animation interpolation mode.

Remarks:
Every animation created after this option is set will have the new interpolation mode specified. You can also change the mode per animation by calling the setInterpolationMode method on the instance in question.

OGREInterpolationMode DigitalSpaces::DIOGREAnimation::GetDefaultInterpolationMode ( void   ) 

Gets the default interpolation mode for all animations.

void DigitalSpaces::DIOGREAnimation::SetDefaultRotationInterpolationMode ( OGRERotationInterpolationMode  im  ) 

Sets the default rotation interpolation mode.

Remarks:
Every animation created after this option is set will have the new interpolation mode specified. You can also change the mode per animation by calling the setInterpolationMode method on the instance in question.

OGRERotationInterpolationMode DigitalSpaces::DIOGREAnimation::GetDefaultRotationInterpolationMode ( void   ) 

Gets the default rotation interpolation mode for all animations.

void DigitalSpaces::DIOGREAnimation::Optimise ( void   ) 

Fast access to NON-UPDATEABLE track list.

Get non-updateable iterator over tracks Optimise an animation by removing unnecessary tracks and keyframes.

Remarks:
When you export an animation, it is possible that certain tracks have been keyfamed but actually don't include anything useful - the keyframes include no transformation. These tracks can be completely eliminated from the animation and thus speed up the animation. In addition, if several keyframes in a row have the same value, then they are just adding overhead and can be removed.


The documentation for this struct was generated from the following file:

Generated on Sun Aug 31 17:46:31 2008 for Digital Spaces by  doxygen 1.5.6