Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::KeyFrame Class Reference

A key frame in an animation sequence defined by an AnimationTrack. More...

#include <OgreKeyFrame.h>

List of all members.

Public Methods

 KeyFrame ()
 Simple constructor, only used for creating temp objects. More...

 KeyFrame (Real time)
 Default constructor, you should not call this but use AnimationTrack::createKeyFrame instead. More...

Real getTime (void) const
 Gets the time of this keyframe in the animation sequence. More...

void setTranslate (const Vector3 &trans)
 Sets the translation associated with this keyframe. More...

Vector3 getTranslate (void) const
 Gets the translation applied by this keyframe. More...

void setScale (const Vector3 &scale)
 Sets the scaling factor applied by this keyframe to the animable object at it's time index. More...

Vector3 getScale (void) const
 Gets the scaling factor applied by this keyframe. More...

void setRotation (const Quaternion &rot)
 Sets the rotation applied by this keyframe. More...

Quaternion getRotation (void) const
 Gets the rotation applied by this keyframe. More...


Protected Attributes

Real mTime
Vector3 mTranslate
Vector3 mScale
Quaternion mRotate


Detailed Description

A key frame in an animation sequence defined by an AnimationTrack.

Remarks:
This class can be used as a basis for all kinds of key frames. The unifying principle is that multiple KeyFrames define an animation sequence, with the exact state of the animation being an interpolation between these key frames.


Constructor & Destructor Documentation

Ogre::KeyFrame::KeyFrame  
 

Simple constructor, only used for creating temp objects.

Ogre::KeyFrame::KeyFrame Real    time
 

Default constructor, you should not call this but use AnimationTrack::createKeyFrame instead.


Member Function Documentation

Quaternion Ogre::KeyFrame::getRotation void    const
 

Gets the rotation applied by this keyframe.

Vector3 Ogre::KeyFrame::getScale void    const
 

Gets the scaling factor applied by this keyframe.

Real Ogre::KeyFrame::getTime void    const
 

Gets the time of this keyframe in the animation sequence.

Vector3 Ogre::KeyFrame::getTranslate void    const
 

Gets the translation applied by this keyframe.

void Ogre::KeyFrame::setRotation const Quaternion   rot
 

Sets the rotation applied by this keyframe.

Parameters:
rot  The rotation applied; use Quaternion methods to convert from angle/axis or Matrix3 if you don't like using Quaternions directly.

void Ogre::KeyFrame::setScale const Vector3   scale
 

Sets the scaling factor applied by this keyframe to the animable object at it's time index.

Parameters:
scale  The vector to scale by (beware of supplying zero values for any component of this vector, it will scale the object to zero dimensions)

void Ogre::KeyFrame::setTranslate const Vector3   trans
 

Sets the translation associated with this keyframe.

Remarks:
The translation factor affects how much the keyframe translates (moves) it's animable object at it's time index.
Parameters:
trans  The vector to translate by


Member Data Documentation

Quaternion Ogre::KeyFrame::mRotate [protected]
 

Vector3 Ogre::KeyFrame::mScale [protected]
 

Real Ogre::KeyFrame::mTime [protected]
 

Vector3 Ogre::KeyFrame::mTranslate [protected]
 

Copyright © 2002 by The OGRE Team