29 #ifndef __Animation_H__ 30 #define __Animation_H__ 64 virtual unsigned short getNumAnimations(
void)
const = 0;
67 virtual Animation* getAnimation(
unsigned short index)
const = 0;
76 virtual bool hasAnimation(
const String& name)
const = 0;
79 virtual void removeAnimation(
const String& name) = 0;
125 const String& getName(
void)
const;
128 Real getLength(
void)
const;
134 void setLength(
Real len);
185 unsigned short getNumNodeTracks(
void)
const;
191 bool hasNodeTrack(
unsigned short handle)
const;
194 unsigned short getNumNumericTracks(
void)
const;
200 bool hasNumericTrack(
unsigned short handle)
const;
203 unsigned short getNumVertexTracks(
void)
const;
209 bool hasVertexTrack(
unsigned short handle)
const;
212 void destroyNodeTrack(
unsigned short handle);
215 void destroyNumericTrack(
unsigned short handle);
218 void destroyVertexTrack(
unsigned short handle);
221 void destroyAllTracks(
void);
224 void destroyAllNodeTracks(
void);
226 void destroyAllNumericTracks(
void);
228 void destroyAllVertexTracks(
void);
240 void apply(
Real timePos,
Real weight = 1.0,
Real scale = 1.0f);
252 void applyToNode(
Node* node,
Real timePos,
Real weight = 1.0,
Real scale = 1.0f);
278 void apply(
Skeleton* skeleton,
Real timePos,
float weight,
289 void apply(
Entity* entity,
Real timePos,
Real weight,
bool software,
382 const NodeTrackList& _getNodeTrackList(
void)
const;
386 {
return NodeTrackIterator(mNodeTrackList.begin(), mNodeTrackList.end()); }
389 const NumericTrackList& _getNumericTrackList(
void)
const;
393 {
return NumericTrackIterator(mNumericTrackList.begin(), mNumericTrackList.end()); }
396 const VertexTrackList& _getVertexTrackList(
void)
const;
400 {
return VertexTrackIterator(mVertexTrackList.begin(), mVertexTrackList.end()); }
421 void optimise(
bool discardIdentityNodeTracks =
true);
433 void _collectIdentityNodeTracks(TrackHandleList& tracks)
const;
437 void _destroyNodeTracks(
const TrackHandleList& tracks);
492 bool getUseBaseKeyFrame()
const;
494 Real getBaseKeyFrameTime()
const;
496 const String& getBaseKeyFrameAnimationName()
const;
499 void _applyBaseKeyFrame();
533 void optimiseNodeTracks(
bool discardIdentityTracks);
534 void optimiseVertexTracks(
void);
537 void buildKeyFrameTimeList(
void)
const;
546 #endif // __Animation_H__ map< unsigned short, NumericAnimationTrack * >::type NumericTrackList
static RotationInterpolationMode msDefaultRotationInterpolationMode
RotationInterpolationMode
The types of rotational interpolation available.
AnimationContainer * mContainer
Time index object used to search keyframe at the given position.
VertexTrackIterator getVertexTrackIterator(void) const
Get non-updateable iterator over node tracks.
virtual ~AnimationContainer()
Summary class collecting together vertex source information.
ConstMapIterator< NumericTrackList > NumericTrackIterator
Concrete IteratorWrapper for const access to the underlying key-value container.
float Real
Software floating point type.
NumericTrackList mNumericTrackList
Numeric tracks, indexed by handle.
vector< float >::type BoneBlendMask
Typedef for an array of float values used as a bone blend mask.
A collection of Bone objects used to animate a skinned mesh.
Specialised AnimationTrack for dealing with generic animable values.
An animation container interface, which allows generic access to sibling animations.
ConstMapIterator< NodeTrackList > NodeTrackIterator
VertexAnimationType
Type of vertex animation.
RotationInterpolationMode mRotationInterpolationMode
map< unsigned short, VertexAnimationTrack * >::type VertexTrackList
Class representing a general-purpose node an articulated scene graph.
map< unsigned short, NodeAnimationTrack * >::type NodeTrackList
InterpolationMode mInterpolationMode
Values are interpolated along straight lines.
NodeTrackList mNodeTrackList
Node tracks, indexed by handle.
ConstMapIterator< VertexTrackList > VertexTrackIterator
set< ushort >::type TrackHandleList
A list of track handles.
bool mKeyFrameTimesDirty
Dirty flag indicate that keyframe time list need to rebuild.
This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info...
NumericTrackIterator getNumericTrackIterator(void) const
Get non-updateable iterator over node tracks.
VertexTrackList mVertexTrackList
Vertex tracks, indexed by handle.
String mBaseKeyFrameAnimationName
Defines an instance of a discrete, movable object based on a Mesh.
NodeTrackIterator getNodeTrackIterator(void) const
Get non-updateable iterator over node tracks.
Specialised AnimationTrack for dealing with changing vertex position information. ...
static InterpolationMode msDefaultInterpolationMode
InterpolationMode
The types of animation interpolation available.
static const String BLANK
Constant blank string, useful for returning by ref where local does not exist.
vector< Real >::type KeyFrameTimeList
Global keyframe time list used to search global keyframe index.
KeyFrameTimeList mKeyFrameTimes
Specialised AnimationTrack for dealing with node transforms.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
void _keyFrameListChanged(void)
Internal method used to tell the animation that keyframe list has been changed, which may cause it to...
Values are interpolated linearly.