29 #ifndef __AnimationTrack_H__
30 #define __AnimationTrack_H__
64 static const uint INVALID_KEY_INDEX = (
uint)-1;
71 , mKeyIndex(INVALID_KEY_INDEX)
88 return mKeyIndex != INVALID_KEY_INDEX;
145 unsigned short getHandle(
void)
const {
return mHandle; }
148 virtual unsigned short getNumKeyFrames(
void)
const;
151 virtual KeyFrame* getKeyFrame(
unsigned short index)
const;
175 unsigned short* firstKeyIndex = 0)
const;
187 virtual void removeKeyFrame(
unsigned short index);
190 virtual void removeAllKeyFrames(
void);
202 virtual void getInterpolatedKeyFrame(
const TimeIndex& timeIndex,
KeyFrame* kf)
const = 0;
211 virtual void apply(
const TimeIndex& timeIndex,
Real weight = 1.0,
Real scale = 1.0f) = 0;
280 virtual void getInterpolatedKeyFrame(
const TimeIndex& timeIndex,
KeyFrame* kf)
const;
283 virtual void apply(
const TimeIndex& timeIndex,
Real weight = 1.0,
Real scale = 1.0f);
294 Real weight = 1.0,
Real scale = 1.0f);
341 virtual Node* getAssociatedNode(
void)
const;
344 virtual void setAssociatedNode(
Node* node);
347 virtual void applyToNode(
Node* node,
const TimeIndex& timeIndex,
Real weight = 1.0,
351 virtual void setUseShortestRotationPath(
bool useShortestPath);
354 virtual bool getUseShortestRotationPath()
const;
357 virtual void getInterpolatedKeyFrame(
const TimeIndex& timeIndex,
KeyFrame* kf)
const;
360 virtual void apply(
const TimeIndex& timeIndex,
Real weight = 1.0,
Real scale = 1.0f);
363 void _keyFrameDataChanged(
void)
const;
373 virtual bool hasNonZeroKeyFrames(
void)
const;
376 virtual void optimise(
void);
385 virtual void buildInterpolationSplines(
void)
const;
490 VertexData* targetData, TargetMode target = TM_SOFTWARE);
512 { (void)timeIndex; (void)kf; }
515 virtual void apply(
const TimeIndex& timeIndex,
Real weight = 1.0,
Real scale = 1.0f);
519 virtual void applyToVertexData(
VertexData* data,
544 virtual bool hasNonZeroKeyFrames(
void)
const;
547 virtual void optimise(
void);
Specialised KeyFrame which stores absolute vertex positions for a complete buffer, designed to be interpolated with other keys in the same track.
This class interpolates orientations (rotations) along a spline using derivatives of quaternions...
float Real
Software floating point type.
A key frame in an animation sequence defined by an AnimationTrack.
unsigned short getHandle(void) const
Get the handle associated with this track.
vector< KeyFrame * >::type KeyFrameList
virtual void setListener(Listener *l)
Set a listener for this track.
Morph animation is made up of many interpolated snapshot keyframes.
virtual void _keyFrameDataChanged(void) const
Internal method used to tell the track that keyframe data has been changed, which may cause it to reb...
Specialised AnimationTrack for dealing with generic animable values.
Specialised AnimationTrack for dealing with node transforms.
A pose is a linked set of vertex offsets applying to one set of vertex data.
TargetMode mTargetMode
Mode to apply.
void setAssociatedVertexData(VertexData *data)
Sets the associated VertexData which this track will update.
Animation * getParent() const
Returns the parent Animation object for this track.
bool mUseShortestRotationPath
Defines if rotation is done using shortest path.
vector< Pose * >::type PoseList
TargetMode getTargetMode(void) const
Get the target mode.
bool hasKeyIndex(void) const
Listener allowing you to override certain behaviour of a track, for example to drive animation proced...
Pose animation is made up of a single delta pose keyframe.
RotationalSpline rotationSpline
VertexAnimationType getAnimationType(void) const
Get the type of vertex animation we're performing.
Time index object used to search keyframe at the given position.
virtual void getInterpolatedKeyFrame(const TimeIndex &timeIndex, KeyFrame *kf) const
This method in fact does nothing, since interpolation is not performed inside the keyframes for this ...
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Real mTimePos
The time position (in relation to the whole animation sequence)
A 'track' in an animation sequence, i.e.
virtual void optimise(void)
Optimise the current track by removing any duplicate keyframes.
VertexAnimationType mAnimationType
Animation type.
Specialised AnimationTrack for dealing with changing vertex position information. ...
uint mKeyIndex
The global keyframe index (in relation to the whole animation sequence) that used to convert to local...
Summary class collecting together vertex source information.
Real getTimePos(void) const
vector< ushort >::type KeyFrameIndexMap
Map used to translate global keyframe time lower bound index to local lower bound index...
TimeIndex(Real timePos, uint keyIndex)
Construct time index object by the given time position and global keyframe index. ...
KeyFrameIndexMap mKeyFrameIndexMap
A very simple spline class which implements the Catmull-Rom class of splines.
SimpleSpline positionSpline
Specialised KeyFrame which references a Mesh::Pose at a certain influence level, which stores offsets...
TimeIndex(Real timePos)
Construct time index object by the given time position.
Interpolate vertex positions in software.
AnimableValuePtr mTargetAnim
Target to animate.
VertexData * mTargetVertexData
Target to animate.
Specialised KeyFrame which stores any numeric value.
void setTargetMode(TargetMode m)
Set the target mode.
VertexAnimationType
Type of vertex animation.
TargetMode
The target animation mode.
Class representing a general-purpose node an articulated scene graph.
VertexData * getAssociatedVertexData(void) const
Gets the associated VertexData which this track will update.
uint getKeyIndex(void) const
virtual bool hasNonZeroKeyFrames(void) const
Method to determine if this track has any KeyFrames which are doing anything useful - can be used to ...