OGRE 2.1
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Ogre::v1::Animation Class Reference

An animation sequence. More...

#include <OgreAnimation.h>

+ Inheritance diagram for Ogre::v1::Animation:

Public Types

enum  InterpolationMode { IM_LINEAR , IM_SPLINE }
 The types of animation interpolation available. More...
 
typedef ConstVectorIterator< NodeTrackListNodeTrackIterator
 
typedef vector< NodeAnimationTrack * >::type NodeTrackList
 
typedef ConstMapIterator< NumericTrackListNumericTrackIterator
 
typedef map< unsignedshort, NumericAnimationTrack * >::type NumericTrackList
 
typedef ConstMapIterator< OldNodeTrackListOldNodeTrackIterator
 
typedef map< unsignedshort, OldNodeAnimationTrack * >::type OldNodeTrackList
 
enum  RotationInterpolationMode { RIM_LINEAR , RIM_SPHERICAL }
 The types of rotational interpolation available. More...
 
typedef set< ushort >::type TrackHandleList
 A list of track handles.
 
typedef ConstMapIterator< VertexTrackListVertexTrackIterator
 
typedef map< unsignedshort, VertexAnimationTrack * >::type VertexTrackList
 

Public Member Functions

 Animation (const String &name, Real length)
 You should not use this constructor directly, use the parent object such as Skeleton instead.
 
virtual ~Animation ()
 
void _applyBaseKeyFrame ()
 Internal method to adjust keyframes relative to a base keyframe (.
 
void _collectIdentityOldNodeTracks (TrackHandleList &tracks) const
 Internal method for collecting identity node tracks.
 
void _destroyOldNodeTracks (const TrackHandleList &tracks)
 Internal method for destroy given node tracks.
 
const NodeTrackList_getNodeTrackList (void) const
 Fast access to NON-UPDATEABLE node track list.
 
const NumericTrackList_getNumericTrackList (void) const
 Fast access to NON-UPDATEABLE numeric track list.
 
const OldNodeTrackList_getOldNodeTrackList (void) const
 Fast access to NON-UPDATEABLE OldNode track list.
 
TimeIndex _getTimeIndex (Real timePos) const
 Internal method used to convert time position to time index object.
 
const VertexTrackList_getVertexTrackList (void) const
 Fast access to NON-UPDATEABLE Vertex track list.
 
void _keyFrameListChanged (void)
 Internal method used to tell the animation that keyframe list has been changed, which may cause it to rebuild some internal data.
 
void _notifyContainer (AnimationContainer *c)
 
void apply (Entity *entity, Real timePos, Real weight, bool software, bool hardware)
 Applies all vertex tracks given a specific time point and weight to a given entity.
 
void apply (Real timePos, Real weight=1.0, Real scale=1.0f)
 Applies an animation given a specific time point and weight.
 
void apply (Skeleton *skeleton, Real timePos, float weight, const AnimationState::BoneBlendMask *blendMask, Real scale)
 Applies all node tracks given a specific time point and weight to a given skeleton.
 
void apply (Skeleton *skeleton, Real timePos, Real weight=1.0, Real scale=1.0f)
 Applies all node tracks given a specific time point and weight to a given skeleton.
 
void applyToAnimable (const AnimableValuePtr &anim, Real timePos, Real weight=1.0, Real scale=1.0f)
 Applies all numeric tracks given a specific time point and weight to the specified animable value.
 
void applyToNode (OldNode *node, Real timePos, Real weight=1.0, Real scale=1.0f)
 Applies all node tracks given a specific time point and weight to the specified node.
 
void applyToVertexData (VertexData *data, Real timePos, Real weight=1.0)
 Applies all vertex tracks given a specific time point and weight to the specified vertex data.
 
Animationclone (const String &newName) const
 Clone this animation.
 
NodeAnimationTrackcreateNodeTrack (Node *node)
 Creates a new AnimationTrack automatically associated with a OldNode.
 
NodeAnimationTrackcreateNodeTrack (void)
 Creates a NodeAnimationTrack for animating a OldNode.
 
NumericAnimationTrackcreateNumericTrack (unsigned short handle)
 Creates a NumericAnimationTrack for animating any numeric value.
 
NumericAnimationTrackcreateNumericTrack (unsigned short handle, const AnimableValuePtr &anim)
 Creates a NumericAnimationTrack and associates it with an animable.
 
OldNodeAnimationTrackcreateOldNodeTrack (unsigned short handle)
 Creates a OldNodeAnimationTrack for animating a OldOldNode.
 
OldNodeAnimationTrackcreateOldNodeTrack (unsigned short handle, OldNode *node)
 Creates a new AnimationTrack automatically associated with a OldNode.
 
VertexAnimationTrackcreateVertexTrack (unsigned short handle, VertexAnimationType animType)
 Creates a VertexAnimationTrack for animating vertex position data.
 
VertexAnimationTrackcreateVertexTrack (unsigned short handle, VertexData *data, VertexAnimationType animType)
 Creates a VertexAnimationTrack and associates it with VertexData.
 
void destroyAllNodeTracks (void)
 Removes and destroys all tracks making up this animation.
 
void destroyAllNumericTracks (void)
 Removes and destroys all tracks making up this animation.
 
void destroyAllOldNodeTracks (void)
 
void destroyAllTracks (void)
 Removes and destroys all tracks making up this animation.
 
void destroyAllVertexTracks (void)
 Removes and destroys all tracks making up this animation.
 
void destroyNodeTrack (unsigned short handle)
 Destroys the node track with the given handle.
 
void destroyNumericTrack (unsigned short handle)
 Destroys the numeric track with the given handle.
 
void destroyOldNodeTrack (unsigned short handle)
 Destroys the node track with the given handle.
 
void destroyVertexTrack (unsigned short handle)
 Destroys the Vertex track with the given handle.
 
const StringgetBaseKeyFrameAnimationName () const
 If a base keyframe is being used, the Animation that provides that keyframe.
 
Real getBaseKeyFrameTime () const
 If a base keyframe is being used, the time of that keyframe.
 
AnimationContainergetContainer ()
 Retrieve the container of this animation.
 
InterpolationMode getInterpolationMode (void) const
 Gets the current interpolation mode of this animation.
 
Real getLength (void) const
 Gets the total length of the animation.
 
const StringgetName (void) const
 Gets the name of this animation.
 
NodeAnimationTrackgetNodeTrack (size_t handle) const
 Gets a node track by it's handle.
 
NodeTrackIterator getNodeTrackIterator (void) const
 Get non-updateable iterator over node tracks.
 
NumericAnimationTrackgetNumericTrack (unsigned short handle) const
 Gets a numeric track by it's handle.
 
NumericTrackIterator getNumericTrackIterator (void) const
 Get non-updateable iterator over node tracks.
 
size_t getNumNodeTracks (void) const
 Gets the number of NodeAnimationTrack objects contained in this animation.
 
unsigned short getNumNumericTracks (void) const
 Gets the number of NumericAnimationTrack objects contained in this animation.
 
size_t getNumOldNodeTracks (void) const
 Gets the number of OldNodeAnimationTrack objects contained in this animation.
 
unsigned short getNumVertexTracks (void) const
 Gets the number of VertexAnimationTrack objects contained in this animation.
 
OldNodeAnimationTrackgetOldNodeTrack (unsigned short handle) const
 Gets a node track by it's handle.
 
OldNodeTrackIterator getOldNodeTrackIterator (void) const
 Get non-updateable iterator over node tracks.
 
RotationInterpolationMode getRotationInterpolationMode (void) const
 Gets the current rotation interpolation mode of this animation.
 
bool getUseBaseKeyFrame () const
 Whether a base keyframe is being used for this Animation.
 
VertexAnimationTrackgetVertexTrack (unsigned short handle) const
 Gets a Vertex track by it's handle.
 
VertexTrackIterator getVertexTrackIterator (void) const
 Get non-updateable iterator over node tracks.
 
bool hasNumericTrack (unsigned short handle) const
 Does a track exist with the given handle?
 
bool hasOldNodeTrack (unsigned short handle) const
 Does a track exist with the given handle?
 
bool hasVertexTrack (unsigned short handle) const
 Does a track exist with the given handle?
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, void *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info
 
voidoperator new (size_t sz, void *ptr)
 placement operator new
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
 
void optimise (bool discardIdentityNodeTracks=true)
 Optimise an animation by removing unnecessary tracks and keyframes.
 
void setInterpolationMode (InterpolationMode im)
 Tells the animation how to interpolate between keyframes.
 
void setLength (Real len)
 Sets the length of the animation.
 
void setRotationInterpolationMode (RotationInterpolationMode im)
 Tells the animation how to interpolate rotations.
 
void setUseBaseKeyFrame (bool useBaseKeyFrame, Real keyframeTime=0.0f, const String &baseAnimName=BLANKSTRING)
 Sets a base keyframe which for the skeletal / pose keyframes in this animation.
 

Static Public Member Functions

static InterpolationMode getDefaultInterpolationMode (void)
 Gets the default interpolation mode for all animations.
 
static RotationInterpolationMode getDefaultRotationInterpolationMode (void)
 Gets the default rotation interpolation mode for all animations.
 
static void setDefaultInterpolationMode (InterpolationMode im)
 Sets the default animation interpolation mode.
 
static void setDefaultRotationInterpolationMode (RotationInterpolationMode im)
 Sets the default rotation interpolation mode.
 

Detailed Description

An animation sequence.

Remarks
This class defines the interface for a sequence of animation, whether that be animation of a mesh, a path along a spline, or possibly more than one type of animation in one. An animation is made up of many 'tracks', which are the more specific types of animation.
You should not create these animations directly. They will be created via a parent object which owns the animation, e.g. Skeleton.

Member Typedef Documentation

◆ NodeTrackIterator

◆ NodeTrackList

◆ NumericTrackIterator

◆ NumericTrackList

◆ OldNodeTrackIterator

◆ OldNodeTrackList

◆ TrackHandleList

A list of track handles.

◆ VertexTrackIterator

◆ VertexTrackList

Member Enumeration Documentation

◆ InterpolationMode

The types of animation interpolation available.

Enumerator
IM_LINEAR 

Values are interpolated along straight lines.

IM_SPLINE 

Values are interpolated along a spline, resulting in smoother changes in direction.

◆ RotationInterpolationMode

The types of rotational interpolation available.

Enumerator
RIM_LINEAR 

Values are interpolated linearly.

This is faster but does not necessarily give a completely accurate result.

RIM_SPHERICAL 

Values are interpolated spherically.

This is more accurate but has a higher cost.

Constructor & Destructor Documentation

◆ Animation()

Ogre::v1::Animation::Animation ( const String name,
Real  length 
)

You should not use this constructor directly, use the parent object such as Skeleton instead.

Parameters
nameThe name of the animation, should be unique within it's parent (e.g. Skeleton)
lengthThe length of the animation in seconds.

◆ ~Animation()

virtual Ogre::v1::Animation::~Animation ( )
virtual

Member Function Documentation

◆ _applyBaseKeyFrame()

void Ogre::v1::Animation::_applyBaseKeyFrame ( )

Internal method to adjust keyframes relative to a base keyframe (.

See also
setUseBaseKeyFrame) *‍/

◆ _collectIdentityOldNodeTracks()

void Ogre::v1::Animation::_collectIdentityOldNodeTracks ( TrackHandleList tracks) const

Internal method for collecting identity node tracks.

Remarks
This method remove non-identity node tracks form the track handle list.
Parameters
tracksA list of track handle of non-identity node tracks, where this method will remove non-identity node track handles.

◆ _destroyOldNodeTracks()

void Ogre::v1::Animation::_destroyOldNodeTracks ( const TrackHandleList tracks)

Internal method for destroy given node tracks.

◆ _getNodeTrackList()

const NodeTrackList & Ogre::v1::Animation::_getNodeTrackList ( void  ) const

Fast access to NON-UPDATEABLE node track list.

◆ _getNumericTrackList()

const NumericTrackList & Ogre::v1::Animation::_getNumericTrackList ( void  ) const

Fast access to NON-UPDATEABLE numeric track list.

◆ _getOldNodeTrackList()

const OldNodeTrackList & Ogre::v1::Animation::_getOldNodeTrackList ( void  ) const

Fast access to NON-UPDATEABLE OldNode track list.

◆ _getTimeIndex()

TimeIndex Ogre::v1::Animation::_getTimeIndex ( Real  timePos) const

Internal method used to convert time position to time index object.

Note
The time index returns by this function are associated with state of the animation object, if the animation object altered (e.g. create/remove keyframe or track), all related time index will invalidated.
Parameters
timePosThe time position.
Returns
The time index object which contains wrapped time position (in relation to the whole animation sequence) and lower bound index of global keyframe time list.

◆ _getVertexTrackList()

const VertexTrackList & Ogre::v1::Animation::_getVertexTrackList ( void  ) const

Fast access to NON-UPDATEABLE Vertex track list.

◆ _keyFrameListChanged()

void Ogre::v1::Animation::_keyFrameListChanged ( void  )
inline

Internal method used to tell the animation that keyframe list has been changed, which may cause it to rebuild some internal data.

◆ _notifyContainer()

void Ogre::v1::Animation::_notifyContainer ( AnimationContainer c)

◆ apply() [1/4]

void Ogre::v1::Animation::apply ( Entity entity,
Real  timePos,
Real  weight,
bool  software,
bool  hardware 
)

Applies all vertex tracks given a specific time point and weight to a given entity.

Parameters
entityThe Entity to which this animation should be applied
timePosThe time position in the animation to apply.
weightThe weight at which the animation should be applied (only affects pose animation)
softwareWhether to populate the software morph vertex data
hardwareWhether to populate the hardware morph vertex data

◆ apply() [2/4]

void Ogre::v1::Animation::apply ( Real  timePos,
Real  weight = 1.0,
Real  scale = 1.0f 
)

Applies an animation given a specific time point and weight.

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

◆ apply() [3/4]

void Ogre::v1::Animation::apply ( Skeleton skeleton,
Real  timePos,
float  weight,
const AnimationState::BoneBlendMask blendMask,
Real  scale 
)

Applies all node tracks given a specific time point and weight to a given skeleton.

Remarks
Where you have associated animation tracks with OldNode objects, you can easily apply an animation to those nodes by calling this method.
Parameters
timePosThe time position in the animation to apply.
weightThe influence to give to this track, 1.0 for full influence, less to blend with other animations.
blendMaskThe influence array defining additional per bone weights. These will be modulated with the weight factor.
scaleThe scale to apply to translations and scalings, useful for adapting an animation to a different size target.

◆ apply() [4/4]

void Ogre::v1::Animation::apply ( Skeleton skeleton,
Real  timePos,
Real  weight = 1.0,
Real  scale = 1.0f 
)

Applies all node tracks given a specific time point and weight to a given skeleton.

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

◆ applyToAnimable()

void Ogre::v1::Animation::applyToAnimable ( const AnimableValuePtr anim,
Real  timePos,
Real  weight = 1.0,
Real  scale = 1.0f 
)

Applies all numeric tracks given a specific time point and weight to the specified animable value.

Remarks
It does not applies to actual attached animable values but rather uses all tracks for a single animable value.
Parameters
timePosThe time position in the animation to apply.
weightThe influence to give to this track, 1.0 for full influence, less to blend with other animations.
scaleThe scale to apply to translations and scalings, useful for adapting an animation to a different size target.

◆ applyToNode()

void Ogre::v1::Animation::applyToNode ( OldNode node,
Real  timePos,
Real  weight = 1.0,
Real  scale = 1.0f 
)

Applies all node tracks given a specific time point and weight to the specified node.

Remarks
It does not consider the actual node tracks are attached to. As such, it resembles the apply method for a given skeleton (see below).
Parameters
timePosThe time position in the animation to apply.
weightThe influence to give to this track, 1.0 for full influence, less to blend with other animations.
scaleThe scale to apply to translations and scalings, useful for adapting an animation to a different size target.

◆ applyToVertexData()

void Ogre::v1::Animation::applyToVertexData ( VertexData data,
Real  timePos,
Real  weight = 1.0 
)

Applies all vertex tracks given a specific time point and weight to the specified vertex data.

Remarks
It does not apply to the actual attached vertex data but rather uses all tracks for a given vertex data.
Parameters
timePosThe time position in the animation to apply.
weightThe influence to give to this track, 1.0 for full influence, less to blend with other animations.

◆ clone()

Animation * Ogre::v1::Animation::clone ( const String newName) const

Clone this animation.

Note
The pointer returned from this method is the only one recorded, thus it is up to the caller to arrange for the deletion of this object.

◆ createNodeTrack() [1/2]

NodeAnimationTrack * Ogre::v1::Animation::createNodeTrack ( Node node)

Creates a new AnimationTrack automatically associated with a OldNode.

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

◆ createNodeTrack() [2/2]

NodeAnimationTrack * Ogre::v1::Animation::createNodeTrack ( void  )

Creates a NodeAnimationTrack for animating a OldNode.

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

◆ createNumericTrack() [1/2]

NumericAnimationTrack * Ogre::v1::Animation::createNumericTrack ( unsigned short  handle)

Creates a NumericAnimationTrack for animating any numeric value.

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

◆ createNumericTrack() [2/2]

NumericAnimationTrack * Ogre::v1::Animation::createNumericTrack ( unsigned short  handle,
const AnimableValuePtr anim 
)

Creates a NumericAnimationTrack and associates it with an animable.

Parameters
handleHandle to give the track, used for accessing the track later.
animAnimable object link Must be unique within this Animation.

◆ createOldNodeTrack() [1/2]

OldNodeAnimationTrack * Ogre::v1::Animation::createOldNodeTrack ( unsigned short  handle)

Creates a OldNodeAnimationTrack for animating a OldOldNode.

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

◆ createOldNodeTrack() [2/2]

OldNodeAnimationTrack * Ogre::v1::Animation::createOldNodeTrack ( unsigned short  handle,
OldNode node 
)

Creates a new AnimationTrack automatically associated with a OldNode.

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

◆ createVertexTrack() [1/2]

VertexAnimationTrack * Ogre::v1::Animation::createVertexTrack ( unsigned short  handle,
VertexAnimationType  animType 
)

Creates a VertexAnimationTrack for animating vertex position data.

Parameters
handleHandle to give the track, used for accessing the track later. Must be unique within this Animation, and is used to identify the target. For example when applied to a Mesh, the handle must reference the index of the geometry being modified; 0 for the shared geometry, and 1+ for SubMesh geometry with the same index-1.
animTypeEither morph or pose animation,

◆ createVertexTrack() [2/2]

VertexAnimationTrack * Ogre::v1::Animation::createVertexTrack ( unsigned short  handle,
VertexData data,
VertexAnimationType  animType 
)

Creates a VertexAnimationTrack and associates it with VertexData.

Parameters
handleHandle to give the track, used for accessing the track later.
dataVertexData object link
animTypeThe animation type Must be unique within this Animation.

◆ destroyAllNodeTracks()

void Ogre::v1::Animation::destroyAllNodeTracks ( void  )

Removes and destroys all tracks making up this animation.

◆ destroyAllNumericTracks()

void Ogre::v1::Animation::destroyAllNumericTracks ( void  )

Removes and destroys all tracks making up this animation.

◆ destroyAllOldNodeTracks()

void Ogre::v1::Animation::destroyAllOldNodeTracks ( void  )

◆ destroyAllTracks()

void Ogre::v1::Animation::destroyAllTracks ( void  )

Removes and destroys all tracks making up this animation.

◆ destroyAllVertexTracks()

void Ogre::v1::Animation::destroyAllVertexTracks ( void  )

Removes and destroys all tracks making up this animation.

◆ destroyNodeTrack()

void Ogre::v1::Animation::destroyNodeTrack ( unsigned short  handle)

Destroys the node track with the given handle.

◆ destroyNumericTrack()

void Ogre::v1::Animation::destroyNumericTrack ( unsigned short  handle)

Destroys the numeric track with the given handle.

◆ destroyOldNodeTrack()

void Ogre::v1::Animation::destroyOldNodeTrack ( unsigned short  handle)

Destroys the node track with the given handle.

◆ destroyVertexTrack()

void Ogre::v1::Animation::destroyVertexTrack ( unsigned short  handle)

Destroys the Vertex track with the given handle.

◆ getBaseKeyFrameAnimationName()

const String & Ogre::v1::Animation::getBaseKeyFrameAnimationName ( ) const

If a base keyframe is being used, the Animation that provides that keyframe.

◆ getBaseKeyFrameTime()

Real Ogre::v1::Animation::getBaseKeyFrameTime ( ) const

If a base keyframe is being used, the time of that keyframe.

◆ getContainer()

AnimationContainer * Ogre::v1::Animation::getContainer ( )

Retrieve the container of this animation.

◆ getDefaultInterpolationMode()

static InterpolationMode Ogre::v1::Animation::getDefaultInterpolationMode ( void  )
static

Gets the default interpolation mode for all animations.

◆ getDefaultRotationInterpolationMode()

static RotationInterpolationMode Ogre::v1::Animation::getDefaultRotationInterpolationMode ( void  )
static

Gets the default rotation interpolation mode for all animations.

◆ getInterpolationMode()

InterpolationMode Ogre::v1::Animation::getInterpolationMode ( void  ) const

Gets the current interpolation mode of this animation.

Remarks
See setInterpolationMode for more info.

◆ getLength()

Real Ogre::v1::Animation::getLength ( void  ) const

Gets the total length of the animation.

◆ getName()

const String & Ogre::v1::Animation::getName ( void  ) const

Gets the name of this animation.

◆ getNodeTrack()

NodeAnimationTrack * Ogre::v1::Animation::getNodeTrack ( size_t  handle) const

Gets a node track by it's handle.

◆ getNodeTrackIterator()

NodeTrackIterator Ogre::v1::Animation::getNodeTrackIterator ( void  ) const
inline

Get non-updateable iterator over node tracks.

◆ getNumericTrack()

NumericAnimationTrack * Ogre::v1::Animation::getNumericTrack ( unsigned short  handle) const

Gets a numeric track by it's handle.

◆ getNumericTrackIterator()

NumericTrackIterator Ogre::v1::Animation::getNumericTrackIterator ( void  ) const
inline

Get non-updateable iterator over node tracks.

◆ getNumNodeTracks()

size_t Ogre::v1::Animation::getNumNodeTracks ( void  ) const

Gets the number of NodeAnimationTrack objects contained in this animation.

◆ getNumNumericTracks()

unsigned short Ogre::v1::Animation::getNumNumericTracks ( void  ) const

Gets the number of NumericAnimationTrack objects contained in this animation.

◆ getNumOldNodeTracks()

size_t Ogre::v1::Animation::getNumOldNodeTracks ( void  ) const

Gets the number of OldNodeAnimationTrack objects contained in this animation.

◆ getNumVertexTracks()

unsigned short Ogre::v1::Animation::getNumVertexTracks ( void  ) const

Gets the number of VertexAnimationTrack objects contained in this animation.

◆ getOldNodeTrack()

OldNodeAnimationTrack * Ogre::v1::Animation::getOldNodeTrack ( unsigned short  handle) const

Gets a node track by it's handle.

◆ getOldNodeTrackIterator()

OldNodeTrackIterator Ogre::v1::Animation::getOldNodeTrackIterator ( void  ) const
inline

Get non-updateable iterator over node tracks.

◆ getRotationInterpolationMode()

RotationInterpolationMode Ogre::v1::Animation::getRotationInterpolationMode ( void  ) const

Gets the current rotation interpolation mode of this animation.

Remarks
See setRotationInterpolationMode for more info.

◆ getUseBaseKeyFrame()

bool Ogre::v1::Animation::getUseBaseKeyFrame ( ) const

Whether a base keyframe is being used for this Animation.

◆ getVertexTrack()

VertexAnimationTrack * Ogre::v1::Animation::getVertexTrack ( unsigned short  handle) const

Gets a Vertex track by it's handle.

◆ getVertexTrackIterator()

VertexTrackIterator Ogre::v1::Animation::getVertexTrackIterator ( void  ) const
inline

Get non-updateable iterator over node tracks.

◆ hasNumericTrack()

bool Ogre::v1::Animation::hasNumericTrack ( unsigned short  handle) const

Does a track exist with the given handle?

◆ hasOldNodeTrack()

bool Ogre::v1::Animation::hasOldNodeTrack ( unsigned short  handle) const

Does a track exist with the given handle?

◆ hasVertexTrack()

bool Ogre::v1::Animation::hasVertexTrack ( unsigned short  handle) const

Does a track exist with the given handle?

◆ operator delete() [1/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr)
inlineinherited

◆ operator delete() [2/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr,
const char ,
int  ,
const char  
)
inlineinherited

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr,
void  
)
inlineinherited

◆ operator delete[]() [1/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void ptr)
inlineinherited

◆ operator delete[]() [2/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void ptr,
const char ,
int  ,
const char  
)
inlineinherited

◆ operator new() [1/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

◆ operator new() [2/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char file,
int  line,
const char func 
)
inlineinherited

operator new, with debug line info

◆ operator new() [3/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void ptr 
)
inlineinherited

placement operator new

◆ operator new[]() [1/2]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

◆ operator new[]() [2/2]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char file,
int  line,
const char func 
)
inlineinherited

array operator new, with debug line info

◆ optimise()

void Ogre::v1::Animation::optimise ( bool  discardIdentityNodeTracks = true)

Optimise an animation by removing unnecessary tracks and keyframes.

Remarks
When you export an animation, it is possible that certain tracks have been keyframed 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.
Note
Since track-less and identity track has difference behavior for accumulate animation blending if corresponding track presenting at other animation that is non-identity, and in normally this method didn't known about the situation of other animation, it can't deciding whether or not discards identity tracks. So there have a parameter allow you choose what you want, in case you aren't sure how to do that, you should use Skeleton::optimiseAllAnimations instead.
Parameters
discardIdentityNodeTracksIf true, discard identity node tracks.

◆ setDefaultInterpolationMode()

static void Ogre::v1::Animation::setDefaultInterpolationMode ( InterpolationMode  im)
static

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.

◆ setDefaultRotationInterpolationMode()

static void Ogre::v1::Animation::setDefaultRotationInterpolationMode ( RotationInterpolationMode  im)
static

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.

◆ setInterpolationMode()

void Ogre::v1::Animation::setInterpolationMode ( InterpolationMode  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.

◆ setLength()

void Ogre::v1::Animation::setLength ( Real  len)

Sets the length of the animation.

Note
Changing the length of an animation may invalidate existing AnimationState instances which will need to be recreated.

◆ setRotationInterpolationMode()

void Ogre::v1::Animation::setRotationInterpolationMode ( RotationInterpolationMode  im)

Tells the animation how to interpolate rotations.

Remarks
By default, animations interpolate linearly 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.

◆ setUseBaseKeyFrame()

void Ogre::v1::Animation::setUseBaseKeyFrame ( bool  useBaseKeyFrame,
Real  keyframeTime = 0.0f,
const String baseAnimName = BLANKSTRING 
)

Sets a base keyframe which for the skeletal / pose keyframes in this animation.

Remarks
Skeletal and pose animation keyframes are expressed as deltas from a given base state. By default, that is the binding setup of the skeleton, or the object space mesh positions for pose animation. However, sometimes it is useful for animators to create animations with a different starting pose, because that's more convenient, and the animation is designed to simply be added to the existing animation state and not globally averaged with other animations (this is always the case with pose animations, but is activated for skeletal animations via ANIMBLEND_CUMULATIVE).
In order for this to work, the keyframes need to be 're-based' against this new starting state, for example by treating the first keyframe as the reference point (and therefore representing no change). This can be achieved by applying the inverse of this reference keyframe against all other keyframes. Since this fundamentally changes the animation, this method just marks the animation as requiring this rebase, which is performed at the next Animation 'apply' call. This is to allow the Animation to be re-saved with this flag set, but without having altered the keyframes yet, so no data is lost unintentionally. If you wish to save the animation after the adjustment has taken place, you can (
See also
_applyBaseKeyFrame)
Parameters
useBaseKeyFrameWhether a base keyframe should be used
keyframeTimeThe time corresponding to the base keyframe, if any
baseAnimNameOptionally a different base animation (must contain the same tracks)

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