OgreAnimationTrack.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4  (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 
29 #ifndef __AnimationTrack_H__
30 #define __AnimationTrack_H__
31 
32 #include "OgrePrerequisites.h"
33 #include "OgreSimpleSpline.h"
34 #include "OgreRotationalSpline.h"
35 #include "OgreKeyFrame.h"
36 #include "OgreAnimable.h"
37 #include "OgrePose.h"
38 #include "OgreHeaderPrefix.h"
39 
40 namespace Ogre
41 {
51  {
52  protected:
62 
65  static const uint INVALID_KEY_INDEX = (uint)-1;
66 
67  public:
70  TimeIndex(Real timePos)
71  : mTimePos(timePos)
72  , mKeyIndex(INVALID_KEY_INDEX)
73  {
74  }
75 
81  TimeIndex(Real timePos, uint keyIndex)
82  : mTimePos(timePos)
83  , mKeyIndex(keyIndex)
84  {
85  }
86 
87  bool hasKeyIndex(void) const
88  {
89  return mKeyIndex != INVALID_KEY_INDEX;
90  }
91 
92  Real getTimePos(void) const
93  {
94  return mTimePos;
95  }
96 
97  uint getKeyIndex(void) const
98  {
99  return mKeyIndex;
100  }
101  };
102 
123  {
124  public:
125 
130  {
131  public:
132  virtual ~Listener() {}
133 
137  virtual bool getInterpolatedKeyFrame(const AnimationTrack* t, const TimeIndex& timeIndex, KeyFrame* kf) = 0;
138  };
139 
141  AnimationTrack(Animation* parent, unsigned short handle);
142 
143  virtual ~AnimationTrack();
144 
146  unsigned short getHandle(void) const { return mHandle; }
147 
149  virtual unsigned short getNumKeyFrames(void) const;
150 
152  virtual KeyFrame* getKeyFrame(unsigned short index) const;
153 
175  virtual Real getKeyFramesAtTime(const TimeIndex& timeIndex, KeyFrame** keyFrame1, KeyFrame** keyFrame2,
176  unsigned short* firstKeyIndex = 0) const;
177 
185  virtual KeyFrame* createKeyFrame(Real timePos);
186 
188  virtual void removeKeyFrame(unsigned short index);
189 
191  virtual void removeAllKeyFrames(void);
192 
193 
203  virtual void getInterpolatedKeyFrame(const TimeIndex& timeIndex, KeyFrame* kf) const = 0;
204 
212  virtual void apply(const TimeIndex& timeIndex, Real weight = 1.0, Real scale = 1.0f) = 0;
213 
216  virtual void _keyFrameDataChanged(void) const {}
217 
222  virtual bool hasNonZeroKeyFrames(void) const { return true; }
223 
225  virtual void optimise(void) {}
226 
228  virtual void _collectKeyFrameTimes(vector<Real>::type& keyFrameTimes);
229 
232  virtual void _buildKeyFrameIndexMap(const vector<Real>::type& keyFrameTimes);
233 
235  virtual void _applyBaseKeyFrame(const KeyFrame* base) {}
236 
238  virtual void setListener(Listener* l) { mListener = l; }
239 
241  Animation *getParent() const { return mParent; }
242  protected:
246  unsigned short mHandle;
248 
252 
254  virtual KeyFrame* createKeyFrameImpl(Real time) = 0;
255 
257  virtual void populateClone(AnimationTrack* clone) const;
258 
259 
260 
261  };
262 
266  {
267  public:
269  NumericAnimationTrack(Animation* parent, unsigned short handle);
271  NumericAnimationTrack(Animation* parent, unsigned short handle,
272  AnimableValuePtr& target);
273 
282 
284  virtual void getInterpolatedKeyFrame(const TimeIndex& timeIndex, KeyFrame* kf) const;
285 
287  virtual void apply(const TimeIndex& timeIndex, Real weight = 1.0, Real scale = 1.0f);
288 
297  void applyToAnimable(const AnimableValuePtr& anim, const TimeIndex& timeIndex,
298  Real weight = 1.0, Real scale = 1.0f);
299 
301  virtual const AnimableValuePtr& getAssociatedAnimable(void) const;
302 
305  virtual void setAssociatedAnimable(const AnimableValuePtr& val);
306 
308  NumericKeyFrame* getNumericKeyFrame(unsigned short index) const;
309 
312 
313 
314  protected:
317 
320 
321 
322  };
323 
327  {
328  public:
330  NodeAnimationTrack(Animation* parent, unsigned short handle);
332  NodeAnimationTrack(Animation* parent, unsigned short handle,
333  Node* targetNode);
345  virtual Node* getAssociatedNode(void) const;
346 
348  virtual void setAssociatedNode(Node* node);
349 
351  virtual void applyToNode(Node* node, const TimeIndex& timeIndex, Real weight = 1.0,
352  Real scale = 1.0f);
353 
355  virtual void setUseShortestRotationPath(bool useShortestPath);
356 
358  virtual bool getUseShortestRotationPath() const;
359 
361  virtual void getInterpolatedKeyFrame(const TimeIndex& timeIndex, KeyFrame* kf) const;
362 
364  virtual void apply(const TimeIndex& timeIndex, Real weight = 1.0, Real scale = 1.0f);
365 
367  void _keyFrameDataChanged(void) const;
368 
370  virtual TransformKeyFrame* getNodeKeyFrame(unsigned short index) const;
371 
372 
377  virtual bool hasNonZeroKeyFrames(void) const;
378 
380  virtual void optimise(void);
381 
383  NodeAnimationTrack* _clone(Animation* newParent) const;
384 
385  void _applyBaseKeyFrame(const KeyFrame* base);
386 
387  protected:
390  // Flag indicating we need to rebuild the splines next time
391  virtual void buildInterpolationSplines(void) const;
392 
393  // Struct for store splines, allocate on demand for better memory footprint
394  struct Splines
395  {
399  };
400 
402  // Prebuilt splines, must be mutable since lazy-update in const method
403  mutable Splines* mSplines;
404  mutable bool mSplineBuildNeeded;
407  };
408 
468  {
470  VAT_NONE = 0,
474  VAT_POSE = 2
475  };
476 
481  {
482  public:
485  {
490  TM_HARDWARE
491  };
493  VertexAnimationTrack(Animation* parent, unsigned short handle, VertexAnimationType animType);
495  VertexAnimationTrack(Animation* parent, unsigned short handle, VertexAnimationType animType,
496  VertexData* targetData, TargetMode target = TM_SOFTWARE);
497 
499  VertexAnimationType getAnimationType(void) const { return mAnimationType; }
500 
503 
512 
516 
519  virtual void getInterpolatedKeyFrame(const TimeIndex& timeIndex, KeyFrame* kf) const;
520 
522  virtual void apply(const TimeIndex& timeIndex, Real weight = 1.0, Real scale = 1.0f);
523 
526  virtual void applyToVertexData(VertexData* data,
527  const TimeIndex& timeIndex, Real weight = 1.0,
528  const PoseList* poseList = 0);
529 
530 
532  VertexMorphKeyFrame* getVertexMorphKeyFrame(unsigned short index) const;
533 
535  VertexPoseKeyFrame* getVertexPoseKeyFrame(unsigned short index) const;
536 
538  void setAssociatedVertexData(VertexData* data) { mTargetVertexData = data; }
540  VertexData* getAssociatedVertexData(void) const { return mTargetVertexData; }
541 
543  void setTargetMode(TargetMode m) { mTargetMode = m; }
545  TargetMode getTargetMode(void) const { return mTargetMode; }
546 
551  virtual bool hasNonZeroKeyFrames(void) const;
552 
554  virtual void optimise(void);
555 
558 
559  void _applyBaseKeyFrame(const KeyFrame* base);
560 
561  protected:
568 
571 
573  void applyPoseToVertexData(const Pose* pose, VertexData* data, Real influence);
574 
575 
576  };
579 }
580 
581 #include "OgreHeaderSuffix.h"
582 
583 #endif
OgreHeaderSuffix.h
Ogre::AnimationTrack::getParent
Animation * getParent() const
Returns the parent Animation object for this track.
Definition: OgreAnimationTrack.h:241
Ogre::NumericAnimationTrack::apply
virtual void apply(const TimeIndex &timeIndex, Real weight=1.0, Real scale=1.0f)
Applies an animation track to the designated target.
Ogre::NodeAnimationTrack::getUseShortestRotationPath
virtual bool getUseShortestRotationPath() const
Gets the method of rotation calculation.
Ogre::KeyFrame
A key frame in an animation sequence defined by an AnimationTrack.
Definition: OgreKeyFrame.h:57
OgreRotationalSpline.h
Ogre::NodeAnimationTrack::setUseShortestRotationPath
virtual void setUseShortestRotationPath(bool useShortestPath)
Sets the method of rotation calculation.
Ogre::VertexAnimationTrack::setAssociatedVertexData
void setAssociatedVertexData(VertexData *data)
Sets the associated VertexData which this track will update.
Definition: OgreAnimationTrack.h:538
Ogre::TimeIndex::TimeIndex
TimeIndex(Real timePos, uint keyIndex)
Construct time index object by the given time position and global keyframe index.
Definition: OgreAnimationTrack.h:81
Ogre::NodeAnimationTrack::mSplines
Splines * mSplines
Definition: OgreAnimationTrack.h:403
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition: OgreMemoryAllocatedObject.h:59
Ogre
Definition: OgreAndroidLogListener.h:35
Ogre::NodeAnimationTrack::setAssociatedNode
virtual void setAssociatedNode(Node *node)
Sets the associated Node object which will be automatically affected by calls to 'apply'.
Ogre::VertexAnimationTrack::applyToVertexData
virtual void applyToVertexData(VertexData *data, const TimeIndex &timeIndex, Real weight=1.0, const PoseList *poseList=0)
As the 'apply' method but applies to specified VertexData instead of associated data.
Ogre::NumericKeyFrame
Specialised KeyFrame which stores any numeric value.
Definition: OgreKeyFrame.h:81
Ogre::AnimationTrack::hasNonZeroKeyFrames
virtual bool hasNonZeroKeyFrames(void) const
Method to determine if this track has any KeyFrames which are doing anything useful - can be used to ...
Definition: OgreAnimationTrack.h:222
OgreAnimable.h
Ogre::NodeAnimationTrack::getNodeKeyFrame
virtual TransformKeyFrame * getNodeKeyFrame(unsigned short index) const
Returns the KeyFrame at the specified index.
Ogre::NodeAnimationTrack::createNodeKeyFrame
virtual TransformKeyFrame * createNodeKeyFrame(Real timePos)
Creates a new KeyFrame and adds it to this animation at the given time index.
Ogre::VertexAnimationTrack::getVertexPoseKeyFrame
VertexPoseKeyFrame * getVertexPoseKeyFrame(unsigned short index) const
Returns the pose KeyFrame at the specified index.
Ogre::VertexAnimationTrack::TargetMode
TargetMode
The target animation mode.
Definition: OgreAnimationTrack.h:485
Ogre::NodeAnimationTrack::mSplineBuildNeeded
bool mSplineBuildNeeded
Definition: OgreAnimationTrack.h:404
Ogre::VertexAnimationType
VertexAnimationType
Type of vertex animation.
Definition: OgreAnimationTrack.h:468
Ogre::VertexAnimationTrack::VertexAnimationTrack
VertexAnimationTrack(Animation *parent, unsigned short handle, VertexAnimationType animType)
Constructor.
Ogre::NodeAnimationTrack::_keyFrameDataChanged
void _keyFrameDataChanged(void) const
Internal method used to tell the track that keyframe data has been changed, which may cause it to reb...
Ogre::RotationalSpline
This class interpolates orientations (rotations) along a spline using derivatives of quaternions.
Definition: OgreRotationalSpline.h:59
Ogre::NodeAnimationTrack::hasNonZeroKeyFrames
virtual bool hasNonZeroKeyFrames(void) const
Method to determine if this track has any KeyFrames which are doing anything useful - can be used to ...
Ogre::VertexAnimationTrack::applyPoseToVertexData
void applyPoseToVertexData(const Pose *pose, VertexData *data, Real influence)
Utility method for applying pose animation.
Ogre::VertexPoseKeyFrame
Specialised KeyFrame which references a Mesh::Pose at a certain influence level, which stores offsets...
Definition: OgreKeyFrame.h:185
Ogre::NumericAnimationTrack
Specialised AnimationTrack for dealing with generic animable values.
Definition: OgreAnimationTrack.h:266
Ogre::VertexAnimationTrack::apply
virtual void apply(const TimeIndex &timeIndex, Real weight=1.0, Real scale=1.0f)
Applies an animation track to the designated target.
Ogre::VertexAnimationTrack::getInterpolatedKeyFrame
virtual void getInterpolatedKeyFrame(const TimeIndex &timeIndex, KeyFrame *kf) const
Gets a KeyFrame object which contains the interpolated transforms at the time index specified.
Ogre::AnimationTrack::getHandle
unsigned short getHandle(void) const
Get the handle associated with this track.
Definition: OgreAnimationTrack.h:146
Ogre::AnimationTrack::_keyFrameDataChanged
virtual void _keyFrameDataChanged(void) const
Internal method used to tell the track that keyframe data has been changed, which may cause it to reb...
Definition: OgreAnimationTrack.h:216
Ogre::VertexAnimationTrack::getTargetMode
TargetMode getTargetMode(void) const
Get the target mode.
Definition: OgreAnimationTrack.h:545
Ogre::TimeIndex::getKeyIndex
uint getKeyIndex(void) const
Definition: OgreAnimationTrack.h:97
Ogre::NodeAnimationTrack::NodeAnimationTrack
NodeAnimationTrack(Animation *parent, unsigned short handle, Node *targetNode)
Constructor, associates with a Node.
Ogre::NumericAnimationTrack::_clone
NumericAnimationTrack * _clone(Animation *newParent) const
Clone this track (internal use only)
Ogre::VertexAnimationTrack::createVertexMorphKeyFrame
virtual VertexMorphKeyFrame * createVertexMorphKeyFrame(Real timePos)
Creates a new morph KeyFrame and adds it to this animation at the given time index.
Ogre::VAT_POSE
@ VAT_POSE
Pose animation is made up of a single delta pose keyframe.
Definition: OgreAnimationTrack.h:474
Ogre::AnimationTrack::removeAllKeyFrames
virtual void removeAllKeyFrames(void)
Removes all the KeyFrames from this track.
Ogre::VertexAnimationTrack
Specialised AnimationTrack for dealing with changing vertex position information.
Definition: OgreAnimationTrack.h:481
Ogre::TimeIndex::mTimePos
Real mTimePos
The time position (in relation to the whole animation sequence)
Definition: OgreAnimationTrack.h:55
Ogre::VertexAnimationTrack::getVertexAnimationIncludesNormals
bool getVertexAnimationIncludesNormals() const
Whether the vertex animation (if present) includes normals.
Ogre::NodeAnimationTrack::_clone
NodeAnimationTrack * _clone(Animation *newParent) const
Clone this track (internal use only)
Ogre::NumericAnimationTrack::getNumericKeyFrame
NumericKeyFrame * getNumericKeyFrame(unsigned short index) const
Returns the KeyFrame at the specified index.
Ogre::Pose
A pose is a linked set of vertex offsets applying to one set of vertex data.
Definition: OgrePose.h:56
Ogre::NodeAnimationTrack::apply
virtual void apply(const TimeIndex &timeIndex, Real weight=1.0, Real scale=1.0f)
Applies an animation track to the designated target.
Ogre::AnimationTrack::createKeyFrameImpl
virtual KeyFrame * createKeyFrameImpl(Real time)=0
Create a keyframe implementation - must be overridden.
Ogre::VertexData
Summary class collecting together vertex source information.
Definition: OgreVertexIndexData.h:50
Ogre::NodeAnimationTrack::optimise
virtual void optimise(void)
Optimise the current track by removing any duplicate keyframes.
Ogre::PoseList
vector< Pose * >::type PoseList
Definition: OgrePose.h:135
Ogre::VertexAnimationTrack::getVertexMorphKeyFrame
VertexMorphKeyFrame * getVertexMorphKeyFrame(unsigned short index) const
Returns the morph KeyFrame at the specified index.
Ogre::AnimationTrack::Listener::~Listener
virtual ~Listener()
Definition: OgreAnimationTrack.h:132
OgreHeaderPrefix.h
Ogre::NodeAnimationTrack::mTargetNode
Node * mTargetNode
Definition: OgreAnimationTrack.h:401
Ogre::NodeAnimationTrack::~NodeAnimationTrack
virtual ~NodeAnimationTrack()
Destructor.
Ogre::VertexAnimationTrack::_clone
VertexAnimationTrack * _clone(Animation *newParent) const
Clone this track (internal use only)
OgrePrerequisites.h
Ogre::AnimationTrack::getKeyFrame
virtual KeyFrame * getKeyFrame(unsigned short index) const
Returns the KeyFrame at the specified index.
Ogre::AnimationTrack::apply
virtual void apply(const TimeIndex &timeIndex, Real weight=1.0, Real scale=1.0f)=0
Applies an animation track to the designated target.
Ogre::NodeAnimationTrack
Specialised AnimationTrack for dealing with node transforms.
Definition: OgreAnimationTrack.h:327
Ogre::VertexAnimationTrack::getAnimationType
VertexAnimationType getAnimationType(void) const
Get the type of vertex animation we're performing.
Definition: OgreAnimationTrack.h:499
Ogre::NodeAnimationTrack::Splines::rotationSpline
RotationalSpline rotationSpline
Definition: OgreAnimationTrack.h:398
Ogre::AnimationTrack::Listener::getInterpolatedKeyFrame
virtual bool getInterpolatedKeyFrame(const AnimationTrack *t, const TimeIndex &timeIndex, KeyFrame *kf)=0
Get an interpolated keyframe for this track at the given time.
Ogre::AnimationTrack
A 'track' in an animation sequence, i.e.
Definition: OgreAnimationTrack.h:123
Ogre::NodeAnimationTrack::getAssociatedNode
virtual Node * getAssociatedNode(void) const
Returns a pointer to the associated Node object (if any).
Ogre::NumericAnimationTrack::createKeyFrameImpl
KeyFrame * createKeyFrameImpl(Real time)
Create a keyframe implementation - must be overridden.
Ogre::TimeIndex::getTimePos
Real getTimePos(void) const
Definition: OgreAnimationTrack.h:92
Ogre::AnimationTrack::mKeyFrameIndexMap
KeyFrameIndexMap mKeyFrameIndexMap
Definition: OgreAnimationTrack.h:251
Ogre::TimeIndex::TimeIndex
TimeIndex(Real timePos)
Construct time index object by the given time position.
Definition: OgreAnimationTrack.h:70
Ogre::AnimationTrack::getNumKeyFrames
virtual unsigned short getNumKeyFrames(void) const
Returns the number of keyframes in this animation.
Ogre::AnimationTrack::mHandle
unsigned short mHandle
Definition: OgreAnimationTrack.h:246
Ogre::VertexAnimationTrack::mTargetVertexData
VertexData * mTargetVertexData
Target to animate.
Definition: OgreAnimationTrack.h:565
Ogre::VertexAnimationTrack::createVertexPoseKeyFrame
virtual VertexPoseKeyFrame * createVertexPoseKeyFrame(Real timePos)
Creates the single pose KeyFrame and adds it to this animation.
Ogre::AnimationTrack::_buildKeyFrameIndexMap
virtual void _buildKeyFrameIndexMap(const vector< Real >::type &keyFrameTimes)
Internal method to build keyframe time index map to translate global lower bound index to local lower...
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::AnimationTrack::mParent
Animation * mParent
Definition: OgreAnimationTrack.h:245
Ogre::NumericAnimationTrack::createNumericKeyFrame
virtual NumericKeyFrame * createNumericKeyFrame(Real timePos)
Creates a new KeyFrame and adds it to this animation at the given time index.
Ogre::SimpleSpline
A very simple spline class which implements the Catmull-Rom class of splines.
Definition: OgreSimpleSpline.h:58
Ogre::AnimationTrack::_applyBaseKeyFrame
virtual void _applyBaseKeyFrame(const KeyFrame *base)
Internal method to re-base the keyframes relative to a given keyframe.
Definition: OgreAnimationTrack.h:235
Ogre::Animation
An animation sequence.
Definition: OgreAnimation.h:93
Ogre::NodeAnimationTrack::Splines
Definition: OgreAnimationTrack.h:395
Ogre::AnimationTrack::AnimationTrack
AnimationTrack(Animation *parent, unsigned short handle)
Constructor.
Ogre::AnimationTrack::mKeyFrames
KeyFrameList mKeyFrames
Definition: OgreAnimationTrack.h:244
Ogre::NodeAnimationTrack::Splines::positionSpline
SimpleSpline positionSpline
Definition: OgreAnimationTrack.h:396
Ogre::SharedPtr< AnimableValue >
Ogre::NodeAnimationTrack::_applyBaseKeyFrame
void _applyBaseKeyFrame(const KeyFrame *base)
Internal method to re-base the keyframes relative to a given keyframe.
Ogre::VertexAnimationTrack::VertexAnimationTrack
VertexAnimationTrack(Animation *parent, unsigned short handle, VertexAnimationType animType, VertexData *targetData, TargetMode target=TM_SOFTWARE)
Constructor, associates with target VertexData and temp buffer (for software)
Ogre::NumericAnimationTrack::setAssociatedAnimable
virtual void setAssociatedAnimable(const AnimableValuePtr &val)
Sets the associated animable object which will be automatically affected by calls to 'apply'.
Ogre::VertexAnimationTrack::mAnimationType
VertexAnimationType mAnimationType
Animation type.
Definition: OgreAnimationTrack.h:563
Ogre::VertexAnimationTrack::optimise
virtual void optimise(void)
Optimise the current track by removing any duplicate keyframes.
Ogre::uint
unsigned int uint
Definition: OgrePrerequisites.h:114
Ogre::NumericAnimationTrack::applyToAnimable
void applyToAnimable(const AnimableValuePtr &anim, const TimeIndex &timeIndex, Real weight=1.0, Real scale=1.0f)
Applies an animation track to a given animable value.
Ogre::AnimationTrack::createKeyFrame
virtual KeyFrame * createKeyFrame(Real timePos)
Creates a new KeyFrame and adds it to this animation at the given time index.
Ogre::VertexAnimationTrack::createKeyFrameImpl
KeyFrame * createKeyFrameImpl(Real time)
Create a keyframe implementation - must be overridden.
Ogre::AnimationTrack::KeyFrameList
vector< KeyFrame * >::type KeyFrameList
Definition: OgreAnimationTrack.h:243
Ogre::AnimationTrack::~AnimationTrack
virtual ~AnimationTrack()
Ogre::NodeAnimationTrack::mUseShortestRotationPath
bool mUseShortestRotationPath
Defines if rotation is done using shortest path.
Definition: OgreAnimationTrack.h:406
Ogre::TransformKeyFrame
Specialised KeyFrame which stores a full transform.
Definition: OgreKeyFrame.h:104
Ogre::VertexAnimationTrack::getAssociatedVertexData
VertexData * getAssociatedVertexData(void) const
Gets the associated VertexData which this track will update.
Definition: OgreAnimationTrack.h:540
Ogre::AnimationTrack::optimise
virtual void optimise(void)
Optimise the current track by removing any duplicate keyframes.
Definition: OgreAnimationTrack.h:225
Ogre::NodeAnimationTrack::NodeAnimationTrack
NodeAnimationTrack(Animation *parent, unsigned short handle)
Constructor.
OgrePose.h
Ogre::AnimationTrack::KeyFrameIndexMap
vector< ushort >::type KeyFrameIndexMap
Map used to translate global keyframe time lower bound index to local lower bound index.
Definition: OgreAnimationTrack.h:250
Ogre::VertexAnimationTrack::mTargetMode
TargetMode mTargetMode
Mode to apply.
Definition: OgreAnimationTrack.h:567
Ogre::AnimationTrack::Listener
Listener allowing you to override certain behaviour of a track, for example to drive animation proced...
Definition: OgreAnimationTrack.h:130
Ogre::NodeAnimationTrack::Splines::scaleSpline
SimpleSpline scaleSpline
Definition: OgreAnimationTrack.h:397
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::NumericAnimationTrack::NumericAnimationTrack
NumericAnimationTrack(Animation *parent, unsigned short handle, AnimableValuePtr &target)
Constructor, associates with an AnimableValue.
Ogre::AnimationTrack::populateClone
virtual void populateClone(AnimationTrack *clone) const
Internal method for clone implementation.
Ogre::VAT_MORPH
@ VAT_MORPH
Morph animation is made up of many interpolated snapshot keyframes.
Definition: OgreAnimationTrack.h:472
Ogre::AnimationTrack::mListener
Listener * mListener
Definition: OgreAnimationTrack.h:247
Ogre::VertexAnimationTrack::TM_SOFTWARE
@ TM_SOFTWARE
Interpolate vertex positions in software.
Definition: OgreAnimationTrack.h:487
Ogre::NodeAnimationTrack::buildInterpolationSplines
virtual void buildInterpolationSplines(void) const
Ogre::VertexAnimationTrack::hasNonZeroKeyFrames
virtual bool hasNonZeroKeyFrames(void) const
Method to determine if this track has any KeyFrames which are doing anything useful - can be used to ...
Ogre::VertexAnimationTrack::_applyBaseKeyFrame
void _applyBaseKeyFrame(const KeyFrame *base)
Internal method to re-base the keyframes relative to a given keyframe.
Ogre::TimeIndex::hasKeyIndex
bool hasKeyIndex(void) const
Definition: OgreAnimationTrack.h:87
Ogre::VertexMorphKeyFrame
Specialised KeyFrame which stores absolute vertex positions for a complete buffer,...
Definition: OgreKeyFrame.h:155
Ogre::NumericAnimationTrack::mTargetAnim
AnimableValuePtr mTargetAnim
Target to animate.
Definition: OgreAnimationTrack.h:316
Ogre::TimeIndex::mKeyIndex
uint mKeyIndex
The global keyframe index (in relation to the whole animation sequence) that used to convert to local...
Definition: OgreAnimationTrack.h:61
Ogre::Node
Class representing a general-purpose node an articulated scene graph.
Definition: OgreNode.h:65
Ogre::VAT_NONE
@ VAT_NONE
No animation.
Definition: OgreAnimationTrack.h:470
Ogre::AnimationTrack::setListener
virtual void setListener(Listener *l)
Set a listener for this track.
Definition: OgreAnimationTrack.h:238
Ogre::vector
Definition: OgrePrerequisites.h:492
Ogre::AnimationTrack::_collectKeyFrameTimes
virtual void _collectKeyFrameTimes(vector< Real >::type &keyFrameTimes)
Internal method to collect keyframe times, in unique, ordered format.
Ogre::NumericAnimationTrack::NumericAnimationTrack
NumericAnimationTrack(Animation *parent, unsigned short handle)
Constructor.
Ogre::TimeIndex
Time index object used to search keyframe at the given position.
Definition: OgreAnimationTrack.h:51
Ogre::AnimationTrack::getKeyFramesAtTime
virtual Real getKeyFramesAtTime(const TimeIndex &timeIndex, KeyFrame **keyFrame1, KeyFrame **keyFrame2, unsigned short *firstKeyIndex=0) const
Gets the 2 KeyFrame objects which are active at the time given, and the blend value between them.
Ogre::VertexAnimationTrack::setTargetMode
void setTargetMode(TargetMode m)
Set the target mode.
Definition: OgreAnimationTrack.h:543
Ogre::NodeAnimationTrack::getInterpolatedKeyFrame
virtual void getInterpolatedKeyFrame(const TimeIndex &timeIndex, KeyFrame *kf) const
Gets a KeyFrame object which contains the interpolated transforms at the time index specified.
OgreKeyFrame.h
Ogre::NumericAnimationTrack::getAssociatedAnimable
virtual const AnimableValuePtr & getAssociatedAnimable(void) const
Returns a pointer to the associated animable object (if any).
OgreSimpleSpline.h
Ogre::NumericAnimationTrack::getInterpolatedKeyFrame
virtual void getInterpolatedKeyFrame(const TimeIndex &timeIndex, KeyFrame *kf) const
Gets a KeyFrame object which contains the interpolated transforms at the time index specified.
Ogre::NodeAnimationTrack::applyToNode
virtual void applyToNode(Node *node, const TimeIndex &timeIndex, Real weight=1.0, Real scale=1.0f)
As the 'apply' method but applies to a specified Node instead of associated node.
Ogre::AnimationTrack::removeKeyFrame
virtual void removeKeyFrame(unsigned short index)
Removes a KeyFrame by it's index.
Ogre::NodeAnimationTrack::createKeyFrameImpl
KeyFrame * createKeyFrameImpl(Real time)
Specialised keyframe creation.
Ogre::AnimationTrack::getInterpolatedKeyFrame
virtual void getInterpolatedKeyFrame(const TimeIndex &timeIndex, KeyFrame *kf) const =0
Gets a KeyFrame object which contains the interpolated transforms at the time index specified.

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.