se_core::Anim Class Reference

#include <Anim.hpp>

List of all members.

Public Types

typedef short MovementMode

Public Member Functions

 Anim ()
void setAnim (const Anim &original)
void setMovementMode (short mode)
 Set the movement mode.
void setMovementMode (long when, short mode)
 Set the movement mode.
short movementMode () const
 Get the present movement mode.
long movementWhen (long when) const
 Get long this movement mode has been active.
void setSpeed (scale_t s)
scale_t speed () const
void setWeight (scale_t w)
scale_t weight () const
void setStartPos (float p)
void addStartPos (float p)
scale_t startPos () const
scale_t pos () const
void resetPos ()
void addPos (scale_t s)
void updatePos ()

Static Public Member Functions

void setMovementModeCount (int c)

Static Public Attributes

int MOVEMENT_MODE_COUNT = 12


Member Typedef Documentation

typedef short se_core::Anim::MovementMode
 

Definition at line 31 of file Anim.hpp.


Constructor & Destructor Documentation

se_core::Anim::Anim  ) 
 

Definition at line 29 of file Anim.cpp.


Member Function Documentation

void se_core::Anim::addPos scale_t  s  )  [inline]
 

Definition at line 96 of file Anim.hpp.

void se_core::Anim::addStartPos float  p  )  [inline]
 

Definition at line 84 of file Anim.hpp.

short se_core::Anim::movementMode  )  const
 

Get the present movement mode.

Returns:
The present movement mode.

Definition at line 59 of file Anim.cpp.

Referenced by se_ogre::ThingEntity::animate(), se_basic::SimpleAreaThingEncoder::encode(), and se_ogre::ThingEntity::setAnimation().

long se_core::Anim::movementWhen long  when  )  const [inline]
 

Get long this movement mode has been active.

Used to check how far into an animation we are Use modulus () to for repeating animations.

Parameters:
when The present adjusted game clock (milliseconds).
Returns:
The present gameClock - when the movement mode started

Definition at line 76 of file Anim.hpp.

scale_t se_core::Anim::pos  )  const [inline]
 

Returns:
0 for beginning of anim, SCALE_RES for end of anim.

Definition at line 94 of file Anim.hpp.

References scale_t.

Referenced by se_ogre::ThingEntity::animate(), and se_basic::SimpleAreaThingEncoder::encode().

void se_core::Anim::resetPos  )  [inline]
 

Definition at line 95 of file Anim.hpp.

void se_core::Anim::setAnim const Anim original  ) 
 

Definition at line 40 of file Anim.cpp.

Referenced by se_core::DefaultTC::_pop(), and se_core::CoDefault::_pop().

void se_core::Anim::setMovementMode long  when,
short  mode
 

Set the movement mode.

The movement mode is used by the graphics engine to choose wich animation to choose for an in game thing. This is the full version, setting both the time when the movement started and the mode itself.

Parameters:
when The adjusted game clock for when the movement started (milliseconds).
mode The new movement mode.

Definition at line 52 of file Anim.cpp.

void se_core::Anim::setMovementMode short  mode  ) 
 

Set the movement mode.

The movement mode is used by the graphics engine to choose wich animation to choose for an in game thing. This simplified version has no when parameter, and should only be used for animations that does not should continue using the started when of the previous movement mode, or of the time when the movement started has no significance.

Parameters:
mode The new movement mode.

Definition at line 46 of file Anim.cpp.

void se_core::Anim::setMovementModeCount int  c  )  [inline, static]
 

Definition at line 99 of file Anim.hpp.

void se_core::Anim::setSpeed scale_t  s  )  [inline]
 

Definition at line 77 of file Anim.hpp.

void se_core::Anim::setStartPos float  p  )  [inline]
 

Definition at line 83 of file Anim.hpp.

void se_core::Anim::setWeight scale_t  w  )  [inline]
 

Definition at line 80 of file Anim.hpp.

Referenced by se_ogre::ThingEntity::animate(), and se_core::PhDefault::blendAnims().

scale_t se_core::Anim::speed  )  const [inline]
 

Definition at line 78 of file Anim.hpp.

References scale_t.

Referenced by se_basic::SimpleAreaThingEncoder::encode().

scale_t se_core::Anim::startPos  )  const [inline]
 

Returns:
0 for beginning of anim, SCALE_RES for end of anim.

Definition at line 89 of file Anim.hpp.

References scale_t.

Referenced by se_basic::SimpleAreaThingEncoder::encode().

void se_core::Anim::updatePos  )  [inline]
 

Definition at line 97 of file Anim.hpp.

Referenced by se_core::PhDefault::blendAnims().

scale_t se_core::Anim::weight  )  const [inline]
 

Definition at line 81 of file Anim.hpp.

References scale_t.

Referenced by se_ogre::ThingEntity::animate(), se_core::PhDefault::blendAnims(), and se_basic::SimpleAreaThingEncoder::encode().


Member Data Documentation

int se_core::Anim::MOVEMENT_MODE_COUNT = 12 [static]
 

Definition at line 26 of file Anim.cpp.


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

Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:27 2007 by Doxygen version 1.3.9.1.

SourceForge.net Logo