Project

General

Profile

SO3Engine

#include <SO3Anim.h>

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

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

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

Protected Member Functions

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

Protected Attributes

Ogre::Animation * ogreAnimation
 
SAnimTrackList animationTrackList
 
SScenemScene
 
- Protected Attributes inherited from SO3::SData
std::string name
 

Detailed Description

Definition at line 41 of file SO3Anim.h.

Member Enumeration Documentation

◆ AnimInterpolationMode

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 54 of file SO3Anim.h.

◆ AnimRotationInterpolationMode

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 59 of file SO3Anim.h.

◆ AnimType

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 44 of file SO3Anim.h.

Constructor & Destructor Documentation

◆ ~SAnim()

SO3::SAnim::~SAnim ( )
virtual

Definition at line 62 of file SO3Anim.cpp.

◆ SAnim()

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

Definition at line 41 of file SO3Anim.cpp.

Member Function Documentation

◆ _GetOgreAnimationState()

virtual Ogre::AnimationState * SO3::SAnim::_GetOgreAnimationState ( )
protectedpure virtual

Get the current Animation State Internal use only

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

◆ _UpdateImpl()

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

Internal use

Reimplemented in SO3::SSequenceAnimation.

Definition at line 383 of file SO3Anim.cpp.

◆ AddAnimationTrack()

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

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

Definition at line 187 of file SO3Anim.cpp.

◆ AddTime()

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

Definition at line 351 of file SO3Anim.cpp.

◆ Apply()

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

Definition at line 220 of file SO3Anim.cpp.

◆ CreateAnimationTrack()

SAnimTrack * SO3::SAnim::CreateAnimationTrack ( const 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 145 of file SO3Anim.cpp.

◆ CreateAnimationTrackImpl()

SAnimTrack * SO3::SAnim::CreateAnimationTrackImpl ( const std::string &  newAnimationTrackName)
protectedvirtual

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

◆ DeleteAnimationTrack()

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

◆ GetAnimationsTracks()

SAnimTrackList SO3::SAnim::GetAnimationsTracks ( ) const

Definition at line 182 of file SO3Anim.cpp.

◆ GetAnimationTrack()

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

Definition at line 174 of file SO3Anim.cpp.

◆ GetEnable()

bool SO3::SAnim::GetEnable ( )
virtual

Reimplemented in SO3::SSequenceAnimation.

Definition at line 302 of file SO3Anim.cpp.

◆ GetIndex()

unsigned short SO3::SAnim::GetIndex ( )

Definition at line 130 of file SO3Anim.cpp.

◆ GetInitialLoop()

bool SO3::SAnim::GetInitialLoop ( )

Definition at line 270 of file SO3Anim.cpp.

◆ GetInitialWeight()

float SO3::SAnim::GetInitialWeight ( )

Definition at line 258 of file SO3Anim.cpp.

◆ GetInterpolationMode()

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

Definition at line 280 of file SO3Anim.cpp.

◆ GetLength()

float SO3::SAnim::GetLength ( )

Definition at line 205 of file SO3Anim.cpp.

◆ GetLoop()

bool SO3::SAnim::GetLoop ( )

Definition at line 317 of file SO3Anim.cpp.

◆ GetNumAnimationsTracks()

unsigned short SO3::SAnim::GetNumAnimationsTracks ( )

Definition at line 169 of file SO3Anim.cpp.

◆ GetOgreAnimationPointer()

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

Definition at line 115 of file SO3Anim.cpp.

◆ GetParentNode()

SNode * SO3::SAnim::GetParentNode ( )

Definition at line 120 of file SO3Anim.cpp.

◆ GetParentScene()

SScene * SO3::SAnim::GetParentScene ( )

Definition at line 110 of file SO3Anim.cpp.

◆ GetPaused()

bool SO3::SAnim::GetPaused ( )

Definition at line 362 of file SO3Anim.cpp.

◆ GetRotationInterpolationMode()

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

Definition at line 290 of file SO3Anim.cpp.

◆ GetSpeed()

float SO3::SAnim::GetSpeed ( )

Definition at line 337 of file SO3Anim.cpp.

◆ GetTimePosition()

float SO3::SAnim::GetTimePosition ( )

Definition at line 228 of file SO3Anim.cpp.

◆ GetType()

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

Definition at line 125 of file SO3Anim.cpp.

◆ GetWeight()

float SO3::SAnim::GetWeight ( )
virtual

Reimplemented in SO3::SPoseAnimation.

Definition at line 243 of file SO3Anim.cpp.

◆ HasEnded()

bool SO3::SAnim::HasEnded ( )

Definition at line 342 of file SO3Anim.cpp.

◆ IsSequenceUpdated()

bool SO3::SAnim::IsSequenceUpdated ( )

Definition at line 392 of file SO3Anim.cpp.

◆ RemoveAnimationTrack()

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

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

Definition at line 192 of file SO3Anim.cpp.

◆ SetEnable()

void SO3::SAnim::SetEnable ( const bool &  enable)
virtual

Reimplemented in SO3::SSequenceAnimation.

Definition at line 295 of file SO3Anim.cpp.

◆ SetInitialLoop()

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

Definition at line 263 of file SO3Anim.cpp.

◆ SetInitialWeight()

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

Definition at line 252 of file SO3Anim.cpp.

◆ SetInterpolationMode()

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

Definition at line 275 of file SO3Anim.cpp.

◆ SetLength()

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

Definition at line 199 of file SO3Anim.cpp.

◆ SetLoop()

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

Definition at line 311 of file SO3Anim.cpp.

◆ SetOptimise()

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

Definition at line 326 of file SO3Anim.cpp.

◆ SetPaused()

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

Definition at line 357 of file SO3Anim.cpp.

◆ SetRotationInterpolationMode()

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

Definition at line 285 of file SO3Anim.cpp.

◆ SetSequenceUpdated()

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

Definition at line 397 of file SO3Anim.cpp.

◆ SetSkipFrame()

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

Definition at line 140 of file SO3Anim.cpp.

◆ SetSpeed()

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

TODO?

Definition at line 332 of file SO3Anim.cpp.

◆ SetTimePosition()

void SO3::SAnim::SetTimePosition ( const float &  timePosition)
virtual

Reimplemented in SO3::SSequenceAnimation.

Definition at line 214 of file SO3Anim.cpp.

◆ SetWeight()

void SO3::SAnim::SetWeight ( const float &  weight)
virtual

Reimplemented in SO3::SPoseAnimation.

Definition at line 237 of file SO3Anim.cpp.

◆ SkipFrame()

bool SO3::SAnim::SkipFrame ( )

Definition at line 135 of file SO3Anim.cpp.

◆ Update()

void SO3::SAnim::Update ( const Ogre::FrameEvent &  evt)

Definition at line 367 of file SO3Anim.cpp.

Member Data Documentation

◆ animationTrackList

SAnimTrackList SO3::SAnim::animationTrackList
protected

Definition at line 66 of file SO3Anim.h.

◆ mScene

SScene* SO3::SAnim::mScene
protected

Definition at line 67 of file SO3Anim.h.

◆ ogreAnimation

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

Definition at line 65 of file SO3Anim.h.


The documentation for this class was generated from the following files: