Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

SAnim Class Reference

#include <SO3Anim.h>

Inheritance diagram for SAnim:
SData SNodeAnimation SSkeletonAnimation 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
}
enum  AnimInterpolationMode { SO3_IM_LINEAR, SO3_IM_SPLINE }
enum  AnimRotationInterpolationMode { SO3_RIM_LINEAR, SO3_RIM_SPHERICAL }

Public Member Functions

 ~SAnim ()
Ogre::Animation * GetOgreAnimationPointer ()
SNodeGetParentNode ()
AnimType GetType ()
unsigned short GetIndex ()
SAnimTrackCreateAnimationTrack (std::string newAnimationTrackName)
void DeleteAnimationTrack (SAnimTrack *existingAnimationTrack)
unsigned short GetNumAnimationsTracks ()
SAnimTrackGetAnimationTrack (std::string animationTrackName)
SAnimTrackGetAnimationTrack (unsigned short animationTrackIndex)
SAnimTrackMap GetAnimationsTracks () const
void SetLength (float length)
float GetLength ()
void SetTimePosition (float timePosition)
float GetTimePosition ()
void SetWeight (float weight)
float GetWeight ()
void SetInterpolationMode (AnimInterpolationMode interpolationMode)
AnimInterpolationMode GetInterpolationMode ()
void SetRotationInterpolationMode (AnimRotationInterpolationMode interpolationMode)
AnimRotationInterpolationMode GetRotationInterpolationMode ()
void SetEnable (bool enable)
bool GetEnable ()
void SetLoop (bool loop)
bool GetLoop ()
void SetOptimise (bool optimize)
void SetSpeed (float newSpeed)
float GetSpeed ()
bool HasEnded ()
void AddTime (float time)
void SetPaused (bool pauseState)
bool GetPaused ()

Protected Member Functions

 SAnim (std::string animationName, SNode *animationAssociatedNode, unsigned short animationId, AnimType animationType)
void AddAnimationTrack (SAnimTrack *existingAnimationTrack)
void RemoveAnimationTrack (SAnimTrack *existingAnimationTrack)
void RemoveAnimationTrack (std::string animationTrackName)
virtual SAnimTrackCreateAnimationTrackImpl (std::string newAnimationTrackName)

Protected Attributes

Ogre::Animation * ogreAnimation
Ogre::AnimationState * ogreAnimationState

Detailed Description

Definition at line 41 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 52 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 57 of file SO3Anim.h.

Enumerator:
SO3_UNKNOWN_ANIM 
SO3_SCENENODE_ANIM 
SO3_SKELETAL_ANIM 
SO3_VERTEX_ANIM 
SO3_FAP_ANIM 

Definition at line 44 of file SO3Anim.h.


Constructor & Destructor Documentation

SAnim::~SAnim (  )

Definition at line 60 of file SO3Anim.cpp.

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

Definition at line 41 of file SO3Anim.cpp.


Member Function Documentation

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

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

Definition at line 152 of file SO3Anim.cpp.

void SAnim::AddTime ( float  time )

Definition at line 283 of file SO3Anim.cpp.

SAnimTrack * 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 100 of file SO3Anim.cpp.

SAnimTrack * 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 SNodeAnimation.

Definition at line 113 of file SO3Anim.cpp.

void 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 118 of file SO3Anim.cpp.

SAnimTrackMap SAnim::GetAnimationsTracks (  ) const

Definition at line 147 of file SO3Anim.cpp.

SAnimTrack * SAnim::GetAnimationTrack ( unsigned short  animationTrackIndex )

Definition at line 138 of file SO3Anim.cpp.

SAnimTrack * SAnim::GetAnimationTrack ( std::string  animationTrackName )

Definition at line 129 of file SO3Anim.cpp.

bool SAnim::GetEnable (  )

Definition at line 248 of file SO3Anim.cpp.

unsigned short SAnim::GetIndex (  )

Definition at line 95 of file SO3Anim.cpp.

SAnim::AnimInterpolationMode SAnim::GetInterpolationMode (  )

Definition at line 227 of file SO3Anim.cpp.

float SAnim::GetLength (  )

Definition at line 197 of file SO3Anim.cpp.

bool SAnim::GetLoop (  )

Definition at line 258 of file SO3Anim.cpp.

unsigned short SAnim::GetNumAnimationsTracks (  )

Definition at line 124 of file SO3Anim.cpp.

Ogre::Animation * SAnim::GetOgreAnimationPointer (  )

Definition at line 80 of file SO3Anim.cpp.

SNode * SAnim::GetParentNode (  )

Definition at line 85 of file SO3Anim.cpp.

bool SAnim::GetPaused (  )

Definition at line 293 of file SO3Anim.cpp.

SAnim::AnimRotationInterpolationMode SAnim::GetRotationInterpolationMode (  )

Definition at line 237 of file SO3Anim.cpp.

float SAnim::GetSpeed (  )

Definition at line 273 of file SO3Anim.cpp.

float SAnim::GetTimePosition (  )

Definition at line 207 of file SO3Anim.cpp.

SAnim::AnimType SAnim::GetType (  )

Definition at line 90 of file SO3Anim.cpp.

float SAnim::GetWeight (  )

Definition at line 217 of file SO3Anim.cpp.

bool SAnim::HasEnded (  )

Definition at line 278 of file SO3Anim.cpp.

void SAnim::RemoveAnimationTrack ( std::string  animationTrackName ) [protected]

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

Definition at line 173 of file SO3Anim.cpp.

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

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

Definition at line 168 of file SO3Anim.cpp.

void SAnim::SetEnable ( bool  enable )

Definition at line 242 of file SO3Anim.cpp.

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

Definition at line 222 of file SO3Anim.cpp.

void SAnim::SetLength ( float  length )

Definition at line 192 of file SO3Anim.cpp.

void SAnim::SetLoop ( bool  loop )

Definition at line 253 of file SO3Anim.cpp.

void SAnim::SetOptimise ( bool  optimize )

Definition at line 263 of file SO3Anim.cpp.

void SAnim::SetPaused ( bool  pauseState )

Definition at line 288 of file SO3Anim.cpp.

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

Definition at line 232 of file SO3Anim.cpp.

void SAnim::SetSpeed ( float  newSpeed )

TODO?

Definition at line 268 of file SO3Anim.cpp.

void SAnim::SetTimePosition ( float  timePosition )

Definition at line 202 of file SO3Anim.cpp.

void SAnim::SetWeight ( float  weight )

Definition at line 212 of file SO3Anim.cpp.


Member Data Documentation

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

Definition at line 63 of file SO3Anim.h.

Ogre::AnimationState* SAnim::ogreAnimationState [protected]

Definition at line 64 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