SO3::SAnim Class Reference

#include <SO3Anim.h>

Inheritance diagram for SO3::SAnim:
SO3::SData SO3::SNodeAnimation SO3::SPoseAnimation SO3::SSequenceAnimation SO3::SSkeletonAnimation SO3::SVertexAnimation

List of all members.

Public Types

enum  AnimType {
  SO3_UNKNOWN_ANIM = 0, SO3_SCENENODE_ANIM = 1, SO3_SKELETAL_ANIM = 2, SO3_VERTEX_ANIM = 3,
  SO3_FAP_ANIM = 4, SO3_POSE_ANIM = 5, SO3_SEQUENCE_ANIM = 6
}
enum  AnimInterpolationMode { SO3_IM_LINEAR, SO3_IM_SPLINE }
enum  AnimRotationInterpolationMode { SO3_RIM_LINEAR, SO3_RIM_SPHERICAL }

Public Member Functions

 ~SAnim ()
Ogre::Animation * GetOgreAnimationPointer ()
SNodeGetParentNode ()
SSceneGetParentScene ()
AnimType GetType ()
bool IsSequenceUpdated ()
void SetSequenceUpdated (bool value)
unsigned short GetIndex ()
SAnimTrackCreateAnimationTrack (std::string newAnimationTrackName)
void DeleteAnimationTrack (SAnimTrack *existingAnimationTrack)
unsigned short GetNumAnimationsTracks ()
SAnimTrackGetAnimationTrack (unsigned short index)
SAnimTrackList GetAnimationsTracks () const
void SetLength (float length)
float GetLength ()
virtual void SetTimePosition (float timePosition)
float GetTimePosition ()
void Apply (float timePosition)
virtual void SetWeight (float weight)
virtual float GetWeight ()
void SetInitialWeight (float weight)
float GetInitialWeight ()
void SetInitialLoop (bool loop)
bool GetInitialLoop ()
void SetInterpolationMode (AnimInterpolationMode interpolationMode)
AnimInterpolationMode GetInterpolationMode ()
void SetRotationInterpolationMode (AnimRotationInterpolationMode interpolationMode)
AnimRotationInterpolationMode GetRotationInterpolationMode ()
virtual void SetEnable (bool enable)
bool GetEnable ()
void SetLoop (bool loop)
bool GetLoop ()
bool SkipFrame ()
void SetSkipFrame (bool state)
void SetOptimise (bool optimize)
void SetSpeed (float newSpeed)
float GetSpeed ()
bool HasEnded ()
void AddTime (float time)
void SetPaused (bool pauseState)
bool GetPaused ()
virtual void _UpdateImpl (const Ogre::FrameEvent &evt)

Protected Member Functions

 SAnim (SScene *scene, std::string animationName, SNode *animationAssociatedNode, unsigned short animationId, AnimType animationType)
void AddAnimationTrack (SAnimTrack *existingAnimationTrack)
void RemoveAnimationTrack (SAnimTrack *existingAnimationTrack)
virtual SAnimTrackCreateAnimationTrackImpl (std::string newAnimationTrackName)
virtual Ogre::AnimationState * _GetOgreAnimationState ()=0

Protected Attributes

Ogre::Animation * ogreAnimation
SAnimTrackList animationTrackList
SScenemScene

Detailed Description

Definition at line 44 of file SO3Anim.h.


Member Enumeration Documentation

Enumerator:
SO3_IM_LINEAR 

Values are interpolated along straight lines.

SO3_IM_SPLINE 

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

Definition at line 57 of file SO3Anim.h.

Enumerator:
SO3_RIM_LINEAR 

Values are interpolated linearly. This is faster but does not necessarily give a completely accurate result.

SO3_RIM_SPHERICAL 

Values are interpolated spherically. This is more accurate but has a higher cost.

Definition at line 62 of file SO3Anim.h.

Enumerator:
SO3_UNKNOWN_ANIM 
SO3_SCENENODE_ANIM 
SO3_SKELETAL_ANIM 
SO3_VERTEX_ANIM 
SO3_FAP_ANIM 
SO3_POSE_ANIM 
SO3_SEQUENCE_ANIM 

Definition at line 47 of file SO3Anim.h.


Constructor & Destructor Documentation

SO3::SAnim::~SAnim (  ) 

Definition at line 66 of file SO3Anim.cpp.

SO3::SAnim::SAnim ( SScene scene,
std::string  animationName,
SNode animationAssociatedNode,
unsigned short  animationId,
AnimType  animationType 
) [protected]

Definition at line 45 of file SO3Anim.cpp.


Member Function Documentation

virtual Ogre::AnimationState* SO3::SAnim::_GetOgreAnimationState (  )  [protected, pure virtual]

Get the current Animation State Internal use only

Implemented in SO3::SNodeAnimation, SO3::SPoseAnimation, SO3::SSequenceAnimation, SO3::SSkeletonAnimation, and SO3::SVertexAnimation.

void SO3::SAnim::_UpdateImpl ( const Ogre::FrameEvent &  evt  )  [virtual]

Internal use

Reimplemented in SO3::SSequenceAnimation.

Definition at line 381 of file SO3Anim.cpp.

void SO3::SAnim::AddAnimationTrack ( SAnimTrack existingAnimationTrack  )  [protected]

Add a SAnimTrack object to the list of handled animations tracks.

Definition at line 191 of file SO3Anim.cpp.

void SO3::SAnim::AddTime ( float  time  ) 

Definition at line 355 of file SO3Anim.cpp.

void SO3::SAnim::Apply ( float  timePosition  ) 

Definition at line 224 of file SO3Anim.cpp.

SAnimTrack * SO3::SAnim::CreateAnimationTrack ( std::string  newAnimationTrackName  ) 
Remarks:
Animations track are not SNode, so not handled by the SScene. So, add function a function to create manually animations tracks here.

Definition at line 149 of file SO3Anim.cpp.

SAnimTrack * SO3::SAnim::CreateAnimationTrackImpl ( std::string  newAnimationTrackName  )  [protected, virtual]

If the user can manually create animation tracks, then this function must be re-defined in the derived class, otherwise not.

Reimplemented in SO3::SNodeAnimation, and SO3::SSequenceAnimation.

Definition at line 162 of file SO3Anim.cpp.

void SO3::SAnim::DeleteAnimationTrack ( SAnimTrack existingAnimationTrack  ) 
Remarks:
Animations track are not SNode, so not handled by the SScene. So, add function a function to delete manually animations tracks here.
Not need to be use before destroy an SAnim object, as SAnim class handle the destruction of all "children" SAnimTrack.

Definition at line 167 of file SO3Anim.cpp.

SAnimTrackList SO3::SAnim::GetAnimationsTracks (  )  const

Definition at line 186 of file SO3Anim.cpp.

SAnimTrack * SO3::SAnim::GetAnimationTrack ( unsigned short  index  ) 

Definition at line 178 of file SO3Anim.cpp.

bool SO3::SAnim::GetEnable (  ) 

Definition at line 306 of file SO3Anim.cpp.

unsigned short SO3::SAnim::GetIndex (  ) 

Definition at line 134 of file SO3Anim.cpp.

bool SO3::SAnim::GetInitialLoop (  ) 

Definition at line 274 of file SO3Anim.cpp.

float SO3::SAnim::GetInitialWeight (  ) 

Definition at line 262 of file SO3Anim.cpp.

SAnim::AnimInterpolationMode SO3::SAnim::GetInterpolationMode (  ) 

Definition at line 284 of file SO3Anim.cpp.

float SO3::SAnim::GetLength (  ) 

Definition at line 209 of file SO3Anim.cpp.

bool SO3::SAnim::GetLoop (  ) 

Definition at line 321 of file SO3Anim.cpp.

unsigned short SO3::SAnim::GetNumAnimationsTracks (  ) 

Definition at line 173 of file SO3Anim.cpp.

Ogre::Animation * SO3::SAnim::GetOgreAnimationPointer (  ) 

Definition at line 119 of file SO3Anim.cpp.

SNode * SO3::SAnim::GetParentNode (  ) 

Definition at line 124 of file SO3Anim.cpp.

SScene * SO3::SAnim::GetParentScene (  ) 

Definition at line 114 of file SO3Anim.cpp.

bool SO3::SAnim::GetPaused (  ) 

Definition at line 366 of file SO3Anim.cpp.

SAnim::AnimRotationInterpolationMode SO3::SAnim::GetRotationInterpolationMode (  ) 

Definition at line 294 of file SO3Anim.cpp.

float SO3::SAnim::GetSpeed (  ) 

Definition at line 341 of file SO3Anim.cpp.

float SO3::SAnim::GetTimePosition (  ) 

Definition at line 232 of file SO3Anim.cpp.

SAnim::AnimType SO3::SAnim::GetType (  ) 

Definition at line 129 of file SO3Anim.cpp.

float SO3::SAnim::GetWeight (  )  [virtual]

Reimplemented in SO3::SPoseAnimation.

Definition at line 247 of file SO3Anim.cpp.

bool SO3::SAnim::HasEnded (  ) 

Definition at line 346 of file SO3Anim.cpp.

bool SO3::SAnim::IsSequenceUpdated (  ) 

Definition at line 392 of file SO3Anim.cpp.

void SO3::SAnim::RemoveAnimationTrack ( SAnimTrack existingAnimationTrack  )  [protected]

Remove a SAnimTrack object from the list of handled animations tracks.

Definition at line 196 of file SO3Anim.cpp.

void SO3::SAnim::SetEnable ( bool  enable  )  [virtual]

Reimplemented in SO3::SSequenceAnimation.

Definition at line 299 of file SO3Anim.cpp.

void SO3::SAnim::SetInitialLoop ( bool  loop  ) 

Definition at line 267 of file SO3Anim.cpp.

void SO3::SAnim::SetInitialWeight ( float  weight  ) 

Definition at line 256 of file SO3Anim.cpp.

void SO3::SAnim::SetInterpolationMode ( SAnim::AnimInterpolationMode  interpolationMode  ) 

Definition at line 279 of file SO3Anim.cpp.

void SO3::SAnim::SetLength ( float  length  ) 

Definition at line 203 of file SO3Anim.cpp.

void SO3::SAnim::SetLoop ( bool  loop  ) 

Definition at line 315 of file SO3Anim.cpp.

void SO3::SAnim::SetOptimise ( bool  optimize  ) 

Definition at line 330 of file SO3Anim.cpp.

void SO3::SAnim::SetPaused ( bool  pauseState  ) 

Definition at line 361 of file SO3Anim.cpp.

void SO3::SAnim::SetRotationInterpolationMode ( SAnim::AnimRotationInterpolationMode  interpolationMode  ) 

Definition at line 289 of file SO3Anim.cpp.

void SO3::SAnim::SetSequenceUpdated ( bool  value  ) 

Definition at line 397 of file SO3Anim.cpp.

void SO3::SAnim::SetSkipFrame ( bool  state  ) 

Definition at line 144 of file SO3Anim.cpp.

void SO3::SAnim::SetSpeed ( float  newSpeed  ) 

TODO?

Definition at line 336 of file SO3Anim.cpp.

void SO3::SAnim::SetTimePosition ( float  timePosition  )  [virtual]

Reimplemented in SO3::SSequenceAnimation.

Definition at line 218 of file SO3Anim.cpp.

void SO3::SAnim::SetWeight ( float  weight  )  [virtual]

Reimplemented in SO3::SPoseAnimation.

Definition at line 241 of file SO3Anim.cpp.

bool SO3::SAnim::SkipFrame (  ) 

Definition at line 139 of file SO3Anim.cpp.


Member Data Documentation

Definition at line 69 of file SO3Anim.h.

SScene* SO3::SAnim::mScene [protected]

Definition at line 70 of file SO3Anim.h.

Ogre::Animation* SO3::SAnim::ogreAnimation [protected]

Definition at line 68 of file SO3Anim.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Mon Oct 31 14:42:35 2011 for SO3Engine by  doxygen 1.6.3