Homepage Demos Overview Downloads Tutorials Reference
Credits

MotionSequenceEngine Class Reference

#include <MotionSequenceEngine.h>

Inheritance diagram for MotionSequenceEngine:

Inheritance graph
[legend]
List of all members.

Detailed Description

A handy little (or not so little) class for switching between a sequence of postures.

Outputs are handled independently. It's easy to add keyframes which modify all of the outputs, but since each output is tracked individually, OutputCmd's with 0 weight can be used to not affect other motions. For instance, pan the head left to right while moving the right leg up and down several times, you won't have to specify the position of the head in its motion at each of the leg motion keyframes.

Be aware that the 0 time frame will be replaced on a call to play() with the current body posture. However, this only applies to outputs which have a non-zero weighted frame defined at some point. The weights, of the 0 time frame will remain unchanged. These weights are initially set to 0, so that it's possible to 'fade in' the first frame of the motion sequence from whereever the body happens to be (or already doing)

To fade out at the end, set a frame with 0 weight for everything. Otherwise it will simply die suddenly. When a joint reaches its last keyframe, it will be set to 0 weight for all future updateOutputs() (unless of course the playhead is reset)

Currently, MotionSequenceEngine is intended mainly for building, not editing. It's easy to add keyframes, but hard/impossible to delete them.

The MotionSequenceEngine base class is an abstract class so that you can create memory efficient motion sequences and simply refer to them by the common base class instead of having to worry about the actual size allocated in the template, MotionSequenceMC.

See also:
MotionSequenceEngine::SizeSmall, MotionSequenceEngine::SizeMedium, MotionSequenceEngine::SizeLarge, MotionSequenceEngine::SizeXLarge,
The file format used is as follows: ('<' and '>' are not meant literally)
  • First line: '#MSq'
  • Followed by any series of:
    • 'advanceTime time-delta' - moves playhead forward, in milliseconds (synonym for delay)
    • 'delay time-delta' - moves playhead forward, in milliseconds (synonym for advanceTime)
    • 'setTime time' - sets play time to specified value, in ms
    • 'outputname value [weight]' - sets the specified output to the value - assumes 1 for weight; you can view the list of valid joint names in the outputNames array within the RobotInfo extension namespace for your model. (e.g. ERS210Info::outputNames[])
    • 'load filename' - file is a posture, sets position
    • 'overlay filename' - file can be a posture or another motion sequence
    • 'degrees' - following values will be interpreted as degrees [default]
    • 'radians' - following values will be interpreted as radians
    • '#comment' - a comment line
  • Last line: '#END'

Lines beginning with '#' are ignored as comments. Be aware if you load the file and then save it again, these comments will be lost.

After loading a motion sequence, the playtime is left at the end. This is to make it easy to append/overlay motion sequences. However, the playhead will be reset to the beginning on the first call to updateOutputs() if isPlaying() returns true.

You can also create a motion sequence dynamically at run time:

  //This code sample will stand up, point the head forward and up 0.1 radians,
  //and then autoprune

  //First declare the MotionSequence itself:
  SharedObject< MotionSequenceMC<MotionSequenceEngine::SizeSmall> > stand;

  //Over the course of the first 700 milliseconds, go to standing posture:
  standSit->setTime(700);
  standSit->setPose(PostureEngine("stand.pos")); // can also use LoadFile("stand.pos")

  //Then take another 700 milliseconds to straighten out the head:
  standSit->advanceTime(700);
  //We'll set joints individually this time, instead of loading a posture file:
  standSit->setOutputCmd(HeadOffset+PanOffset,0);
  standSit->setOutputCmd(HeadOffset+RollOffset,0);
  standSit->setOutputCmd(HeadOffset+TiltOffset,0.1); //look up .1 radians

  //Add to MotionManager:
  motman->addPersistentMotion(standSit);
  //Playback will now begin automatically, and region deallocated when done

By default, playing is true. Thus, when you add a MotionSequenceMC to the MotionManager, it will begin executing automatically. If you do not want this behavior, simply call pause() before adding the sequence.

When the sequence reaches the end, isAlive() will return false. If the motion was added with MotionManager::addPrunableMotion, the motion sequence will then autoprune itself from the MotionManager. However, you can either call MotionManager::addPersistentMotion() to add it, or call setAutoPrune(false), if you want to retain the same instantiation between executions.

See also:
PostureEngine for information on the posture files

Definition at line 102 of file MotionSequenceEngine.h.

Public Member Functions

 MotionSequenceEngine ()
 constructor, will start playing immediately
virtual ~MotionSequenceEngine ()
 destructor
virtual int updateOutputs ()
 similar to the MotionCommand::updateOutputs, although this isn't a motion command, and doesn't make any calls on MotionManager - merely updates lasttime, expects subclasses to do the work of sending new commands to the system
LoadSave related
virtual unsigned int getBinSize () const
 inherited, returns the size used to save the sequence
virtual unsigned int LoadBuffer (const char buf[], unsigned int len)
 inherited, doesn't clear before loading - call clear yourself if you want to reset, otherwise it will overlay. Leaves playtime at end of load.
virtual unsigned int SaveBuffer (char buf[], unsigned int len) const
 inherited, saves the motion sequence - will save a flat file - doesn't remember references to other files which were loaded
virtual unsigned int LoadFile (const char filename[])
 inherited, doesn't clear before loading - call clear yourself if you want to reset, otherwise it will overlay. Leaves playtime at end of load.
virtual unsigned int SaveFile (const char filename[]) const
 inherited, saves the motion sequence - will save a flat file - doesn't remember references to other files which were loaded
void setSaveDegrees ()
 will store angles as degrees on future saves
bool isSaveDegrees () const
 returns true if will store angles as degrees on future saves
void setSaveRadians ()
 will store angles as radians on future saves
bool isSaveRadians () const
 returns true if will store angles as degrees on future saves
Sequence Construction
virtual void clear ()=0
 empties out the sequence (constant time operation - faster than a series of pops)
void setTime (unsigned int x)
 set the time for both playback and editing (in milliseconds)
unsigned int advanceTime (unsigned int x)
 advance the play/edit index by x milliseconds, and then returns the new getTime()
void setOutputCmd (unsigned int i, const OutputCmd &cmd)
 will insert a keyframe for the given output, or change an existing one
const OutputCmdgetOutputCmd (unsigned int i)
 gets the value of output i at the playhead
void setPose (const PostureEngine &pose)
 calls setOutputCmd on each of the OutputCmds in pose
void overlayPose (const PostureEngine &pose)
 calls setOutputCmd on non-zero weighted OutputCmds in pose
void compress ()
 compresses the sequence by eliminating sequences of moves which are identical
virtual unsigned int getMaxFrames () const =0
 returns the maximum number of key frames (Move's) which can be stored, determined by the instantiating MotionSequenceMC's template parameter
virtual unsigned int getUsedFrames () const =0
 returns the number of used key frames (Move's) which have been stored by the instantiation MotionSequenceEngine subclass
void makeSafe (const float vels[NumOutputs], float margin)
 will insert time into the motion where needed to keep the joint velocities at or below the speeds given in vels * margin
Playback Control
bool isPlaying ()
void play ()
 restarts playback from beginning
void pause ()
 pauses playback until another call to play() or resume()
void resume ()
 begins playback from the current playtime
unsigned int getTime () const
 returns the current position of the playback (in milliseconds), see setTime()
unsigned int getEndTime () const
 returns the length of the motion sequence (in milliseconds)
void setSpeed (float x)
 sets the playback speed (e.g. 1=regular, 0.5=half speed, -1=backwards)
float getSpeed () const
 returns the playback speed
Deprecated
void setPlayTime (unsigned int x) __attribute__((deprecated))
 deprecated, use setTime(unsigned int x)
unsigned int getPlayTime () const __attribute__((deprecated))
 deprecated, use getTime()
void setPlaySpeed (float x) __attribute__((deprecated))
 deprecated, use setSpeed(float x)
float getPlaySpeed () const __attribute__((deprecated))
 deprecated, use getSpeed()

Static Public Member Functions

Template Sizes (deprecated)
static const unsigned int
SizeTiny 
__attribute__ ((deprecated))
 deprecated, use TinyMotionSequenceMC for type specification, or TinyMotionSequenceMC::CAPACITY if you need the actual value
static const unsigned int
SizeSmall 
__attribute__ ((deprecated))
 deprecated, use SmallMotionSequenceMC for type specification, or SmallMotionSequenceMC::CAPACITY if you need the actual value
static const unsigned int
SizeMedium 
__attribute__ ((deprecated))
 deprecated, use MediumMotionSequenceMC for type specification, or MediumMotionSequenceMC::CAPACITY if you need the actual value
static const unsigned int
SizeLarge 
__attribute__ ((deprecated))
 deprecated, use LargeMotionSequenceMC for type specification, or LargeMotionSequenceMC::CAPACITY if you need the actual value
static const unsigned int
SizeXLarge 
__attribute__ ((deprecated))
 deprecated, use XLargeMotionSequenceMC for type specification, or XLargeMotionSequenceMC::CAPACITY if you need the actual value

Protected Types

typedef unsigned short Move_idx_t
 type for indexes to move structures in #moves

Protected Member Functions

virtual MovegetKeyFrame (Move_idx_t x)=0
 returns the Move struct corresponding to x in the subclass's actual data structure
virtual const MovegetKeyFrame (Move_idx_t x) const =0
 returns the Move struct corresponding to x in the subclass's actual data structure
virtual Move_idx_t newKeyFrame ()=0
 causes subclass to create a new Move structure, returns its index
virtual void eraseKeyFrame (Move_idx_t x)=0
 causes subclass to mark the corresponding Move structure as free
void calcOutput (OutputCmd &ans, unsigned int t, const Move &prev, const Move &next) const
 Does the actual calculation of position information. Perhaps replace with a Bezier or spline or something?
virtual void setRange (unsigned int t, Move_idx_t &prev, Move_idx_t &next) const =0
 Sets prev and next to the appropriate values for the given time and output index.
unsigned int setNextFrameTime (Move_idx_t p[NumOutputs], Move_idx_t n[NumOutputs]) const
 sets playtime to next time for which any output has a keyframe, -1 if none exists

Static Protected Member Functions

static unsigned int readWord (const char buf[], const char *const buflen, char word[], const unsigned int wordlen)
 reads a line from a file, parsing it into variables, returns ending position
static unsigned int getOutputIndex (const char name[], unsigned int i)
 returns the index for the output named in the string or NumOutputs if not found, begins search through RobotInfo::outputName's at index i

Protected Attributes

Move_idx_t starts [NumOutputs]
 the beginning frame for each output animation
Move_idx_t prevs [NumOutputs]
 the previous frame (the starttime for this frame will always be less than or equal to playtime)
Move_idx_t nexts [NumOutputs]
 the upcoming frame (the starttime for this frame will always be greater than playtime)
OutputCmd curs [NumOutputs]
 merely a cache of current values (if computed, see curstamps)
unsigned int curstamps [NumOutputs]
 timestamp of corresponding value in curs
unsigned int playtime
 the current time of playback, 0 is start of sequence
unsigned int lasttime
 the time of the last update
unsigned int endtime
 max of #moves's Move::starttime's
float playspeed
 multiplies the difference between current time and starttime, negative will cause play backwards
bool playing
 true if playing, false if paused
float loadSaveMode
 1 to use radians, M_PI/180 for degrees during a save

Static Protected Attributes

static Move_idx_t invalid_move = -1U
 used to mark the ends of the Move linked lists

Classes

struct  Move
 This struct holds all the information needed about a frame for a particular output. More...


Member Typedef Documentation

typedef unsigned short MotionSequenceEngine::Move_idx_t [protected]
 

type for indexes to move structures in #moves

Definition at line 167 of file MotionSequenceEngine.h.


Constructor & Destructor Documentation

MotionSequenceEngine::MotionSequenceEngine  )  [inline]
 

constructor, will start playing immediately

Definition at line 105 of file MotionSequenceEngine.h.

virtual MotionSequenceEngine::~MotionSequenceEngine  )  [inline, virtual]
 

destructor

Definition at line 107 of file MotionSequenceEngine.h.


Member Function Documentation

static const unsigned int SizeXLarge MotionSequenceEngine::__attribute__ (deprecated)   )  [static]
 

deprecated, use XLargeMotionSequenceMC for type specification, or XLargeMotionSequenceMC::CAPACITY if you need the actual value

static const unsigned int SizeLarge MotionSequenceEngine::__attribute__ (deprecated)   )  [static]
 

deprecated, use LargeMotionSequenceMC for type specification, or LargeMotionSequenceMC::CAPACITY if you need the actual value

static const unsigned int SizeMedium MotionSequenceEngine::__attribute__ (deprecated)   )  [static]
 

deprecated, use MediumMotionSequenceMC for type specification, or MediumMotionSequenceMC::CAPACITY if you need the actual value

static const unsigned int SizeSmall MotionSequenceEngine::__attribute__ (deprecated)   )  [static]
 

deprecated, use SmallMotionSequenceMC for type specification, or SmallMotionSequenceMC::CAPACITY if you need the actual value

static const unsigned int SizeTiny MotionSequenceEngine::__attribute__ (deprecated)   )  [static]
 

deprecated, use TinyMotionSequenceMC for type specification, or TinyMotionSequenceMC::CAPACITY if you need the actual value

Deprecated:
use MotionSequenceMC typedefs (e.g. TinyMotionSequenceMC) in conjunction with MotionSequenceMC::CAPACITY()

unsigned int MotionSequenceEngine::advanceTime unsigned int  x  )  [inline]
 

advance the play/edit index by x milliseconds, and then returns the new getTime()

Definition at line 137 of file MotionSequenceEngine.h.

void MotionSequenceEngine::calcOutput OutputCmd ans,
unsigned int  t,
const Move prev,
const Move next
const [inline, protected]
 

Does the actual calculation of position information. Perhaps replace with a Bezier or spline or something?

Definition at line 200 of file MotionSequenceEngine.h.

Referenced by compress(), getOutputCmd(), MotionSequenceMC< MAXMOVE >::updateOutputs(), and DynamicMotionSequence::updateOutputs().

virtual void MotionSequenceEngine::clear  )  [pure virtual]
 

empties out the sequence (constant time operation - faster than a series of pops)

Implemented in DynamicMotionSequence, and MotionSequenceMC< MAXMOVE >.

void MotionSequenceEngine::compress  ) 
 

compresses the sequence by eliminating sequences of moves which are identical

Definition at line 317 of file MotionSequenceEngine.cc.

virtual void MotionSequenceEngine::eraseKeyFrame Move_idx_t  x  )  [protected, pure virtual]
 

causes subclass to mark the corresponding Move structure as free

Implemented in DynamicMotionSequence, and MotionSequenceMC< MAXMOVE >.

Referenced by compress().

unsigned int MotionSequenceEngine::getBinSize  )  const [virtual]
 

inherited, returns the size used to save the sequence

Implements LoadSave.

Definition at line 40 of file MotionSequenceEngine.cc.

unsigned int MotionSequenceEngine::getEndTime  )  const [inline]
 

returns the length of the motion sequence (in milliseconds)

Definition at line 154 of file MotionSequenceEngine.h.

virtual const Move& MotionSequenceEngine::getKeyFrame Move_idx_t  x  )  const [protected, pure virtual]
 

returns the Move struct corresponding to x in the subclass's actual data structure

Implemented in DynamicMotionSequence, and MotionSequenceMC< MAXMOVE >.

virtual Move& MotionSequenceEngine::getKeyFrame Move_idx_t  x  )  [protected, pure virtual]
 

returns the Move struct corresponding to x in the subclass's actual data structure

Implemented in DynamicMotionSequence, and MotionSequenceMC< MAXMOVE >.

Referenced by compress(), getBinSize(), getOutputCmd(), makeSafe(), resume(), SaveBuffer(), setNextFrameTime(), and setOutputCmd().

virtual unsigned int MotionSequenceEngine::getMaxFrames  )  const [pure virtual]
 

returns the maximum number of key frames (Move's) which can be stored, determined by the instantiating MotionSequenceMC's template parameter

Implemented in DynamicMotionSequence, and MotionSequenceMC< MAXMOVE >.

const OutputCmd & MotionSequenceEngine::getOutputCmd unsigned int  i  ) 
 

gets the value of output i at the playhead

Definition at line 29 of file MotionSequenceEngine.cc.

Referenced by MotionSequenceMC< MAXMOVE >::updateOutputs(), and DynamicMotionSequence::updateOutputs().

unsigned int MotionSequenceEngine::getOutputIndex const char  name[],
unsigned int  i
[static, protected]
 

returns the index for the output named in the string or NumOutputs if not found, begins search through RobotInfo::outputName's at index i

Definition at line 427 of file MotionSequenceEngine.cc.

Referenced by LoadBuffer().

float MotionSequenceEngine::getPlaySpeed  )  const
 

deprecated, use getSpeed()

Deprecated:
, use getSpeed()

Definition at line 461 of file MotionSequenceEngine.cc.

unsigned int MotionSequenceEngine::getPlayTime  )  const
 

deprecated, use getTime()

Deprecated:
, use getTime()

Definition at line 451 of file MotionSequenceEngine.cc.

float MotionSequenceEngine::getSpeed  )  const [inline]
 

returns the playback speed

Definition at line 156 of file MotionSequenceEngine.h.

Referenced by getPlaySpeed().

unsigned int MotionSequenceEngine::getTime  )  const [inline]
 

returns the current position of the playback (in milliseconds), see setTime()

Definition at line 153 of file MotionSequenceEngine.h.

Referenced by getPlayTime().

virtual unsigned int MotionSequenceEngine::getUsedFrames  )  const [pure virtual]
 

returns the number of used key frames (Move's) which have been stored by the instantiation MotionSequenceEngine subclass

Implemented in DynamicMotionSequence, and MotionSequenceMC< MAXMOVE >.

bool MotionSequenceEngine::isPlaying  ) 
 

Definition at line 372 of file MotionSequenceEngine.cc.

Referenced by MotionSequenceMC< MAXMOVE >::isDirty(), DynamicMotionSequence::isDirty(), MotionSequenceMC< MAXMOVE >::updateOutputs(), updateOutputs(), and DynamicMotionSequence::updateOutputs().

bool MotionSequenceEngine::isSaveDegrees  )  const [inline]
 

returns true if will store angles as degrees on future saves

Definition at line 129 of file MotionSequenceEngine.h.

bool MotionSequenceEngine::isSaveRadians  )  const [inline]
 

returns true if will store angles as degrees on future saves

Definition at line 131 of file MotionSequenceEngine.h.

Referenced by getBinSize(), and SaveBuffer().

unsigned int MotionSequenceEngine::LoadBuffer const char  buf[],
unsigned int  len
[virtual]
 

inherited, doesn't clear before loading - call clear yourself if you want to reset, otherwise it will overlay. Leaves playtime at end of load.

Implements LoadSave.

Definition at line 69 of file MotionSequenceEngine.cc.

unsigned int MotionSequenceEngine::LoadFile const char  filename[]  )  [virtual]
 

inherited, doesn't clear before loading - call clear yourself if you want to reset, otherwise it will overlay. Leaves playtime at end of load.

Definition at line 267 of file MotionSequenceEngine.cc.

Referenced by DynamicMotionSequence::DynamicMotionSequence(), LoadBuffer(), and MotionSequenceMC< MAXMOVE >::MotionSequenceMC().

void MotionSequenceEngine::makeSafe const float  vels[NumOutputs],
float  margin
 

will insert time into the motion where needed to keep the joint velocities at or below the speeds given in vels * margin

Definition at line 344 of file MotionSequenceEngine.cc.

virtual Move_idx_t MotionSequenceEngine::newKeyFrame  )  [protected, pure virtual]
 

causes subclass to create a new Move structure, returns its index

Implemented in DynamicMotionSequence, and MotionSequenceMC< MAXMOVE >.

Referenced by setOutputCmd().

void MotionSequenceEngine::overlayPose const PostureEngine pose  ) 
 

calls setOutputCmd on non-zero weighted OutputCmds in pose

Definition at line 311 of file MotionSequenceEngine.cc.

Referenced by LoadBuffer().

void MotionSequenceEngine::pause  )  [inline]
 

pauses playback until another call to play() or resume()

Definition at line 151 of file MotionSequenceEngine.h.

void MotionSequenceEngine::play  ) 
 

restarts playback from beginning

Definition at line 377 of file MotionSequenceEngine.cc.

Referenced by DriveMeBehavior::processEvent(), and updateOutputs().

unsigned int MotionSequenceEngine::readWord const char  buf[],
const char *const   buflen,
char  word[],
const unsigned int  wordlen
[static, protected]
 

reads a line from a file, parsing it into variables, returns ending position

Definition at line 411 of file MotionSequenceEngine.cc.

Referenced by LoadBuffer().

void MotionSequenceEngine::resume  ) 
 

begins playback from the current playtime

Definition at line 385 of file MotionSequenceEngine.cc.

Referenced by play().

unsigned int MotionSequenceEngine::SaveBuffer char  buf[],
unsigned int  len
const [virtual]
 

inherited, saves the motion sequence - will save a flat file - doesn't remember references to other files which were loaded

Implements LoadSave.

Definition at line 207 of file MotionSequenceEngine.cc.

unsigned int MotionSequenceEngine::SaveFile const char  filename[]  )  const [virtual]
 

inherited, saves the motion sequence - will save a flat file - doesn't remember references to other files which were loaded

Definition at line 270 of file MotionSequenceEngine.cc.

unsigned int MotionSequenceEngine::setNextFrameTime Move_idx_t  p[NumOutputs],
Move_idx_t  n[NumOutputs]
const [protected]
 

sets playtime to next time for which any output has a keyframe, -1 if none exists

Definition at line 400 of file MotionSequenceEngine.cc.

Referenced by getBinSize(), makeSafe(), and SaveBuffer().

void MotionSequenceEngine::setOutputCmd unsigned int  i,
const OutputCmd cmd
 

will insert a keyframe for the given output, or change an existing one

Definition at line 280 of file MotionSequenceEngine.cc.

Referenced by LoadBuffer(), overlayPose(), and setPose().

void MotionSequenceEngine::setPlaySpeed float  x  ) 
 

deprecated, use setSpeed(float x)

Deprecated:
, use setSpeed(float x)

Definition at line 456 of file MotionSequenceEngine.cc.

void MotionSequenceEngine::setPlayTime unsigned int  x  ) 
 

deprecated, use setTime(unsigned int x)

Deprecated:
, call setTime(unsigned int x) instead

Definition at line 446 of file MotionSequenceEngine.cc.

Referenced by DynamicMotionSequence::clear(), and DynamicMotionSequence::DynamicMotionSequence().

void MotionSequenceEngine::setPose const PostureEngine pose  ) 
 

calls setOutputCmd on each of the OutputCmds in pose

Definition at line 306 of file MotionSequenceEngine.cc.

Referenced by LoadBuffer().

virtual void MotionSequenceEngine::setRange unsigned int  t,
Move_idx_t prev,
Move_idx_t next
const [protected, pure virtual]
 

Sets prev and next to the appropriate values for the given time and output index.

Implemented in DynamicMotionSequence, and MotionSequenceMC< MAXMOVE >.

Referenced by setNextFrameTime(), and setTime().

void MotionSequenceEngine::setSaveDegrees  )  [inline]
 

will store angles as degrees on future saves

Definition at line 128 of file MotionSequenceEngine.h.

Referenced by LoadBuffer().

void MotionSequenceEngine::setSaveRadians  )  [inline]
 

will store angles as radians on future saves

Definition at line 130 of file MotionSequenceEngine.h.

Referenced by LoadBuffer().

void MotionSequenceEngine::setSpeed float  x  )  [inline]
 

sets the playback speed (e.g. 1=regular, 0.5=half speed, -1=backwards)

Definition at line 155 of file MotionSequenceEngine.h.

Referenced by setPlaySpeed().

void MotionSequenceEngine::setTime unsigned int  x  ) 
 

set the time for both playback and editing (in milliseconds)

Definition at line 274 of file MotionSequenceEngine.cc.

Referenced by advanceTime(), MotionSequenceMC< MAXMOVE >::clear(), LoadBuffer(), MotionSequenceMC< MAXMOVE >::MotionSequenceMC(), play(), setPlayTime(), and updateOutputs().

int MotionSequenceEngine::updateOutputs  )  [virtual]
 

similar to the MotionCommand::updateOutputs, although this isn't a motion command, and doesn't make any calls on MotionManager - merely updates lasttime, expects subclasses to do the work of sending new commands to the system

Reimplemented in DynamicMotionSequence, and MotionSequenceMC< MAXMOVE >.

Definition at line 12 of file MotionSequenceEngine.cc.

Referenced by MotionSequenceMC< MAXMOVE >::updateOutputs(), and DynamicMotionSequence::updateOutputs().


Member Data Documentation

OutputCmd MotionSequenceEngine::curs[NumOutputs] [protected]
 

merely a cache of current values (if computed, see curstamps)

Definition at line 184 of file MotionSequenceEngine.h.

Referenced by getOutputCmd().

unsigned int MotionSequenceEngine::curstamps[NumOutputs] [protected]
 

timestamp of corresponding value in curs

Definition at line 185 of file MotionSequenceEngine.h.

Referenced by getOutputCmd().

unsigned int MotionSequenceEngine::endtime [protected]
 

max of #moves's Move::starttime's

Definition at line 188 of file MotionSequenceEngine.h.

Referenced by getEndTime(), MotionSequenceEngine(), play(), and setOutputCmd().

MotionSequenceEngine::Move_idx_t MotionSequenceEngine::invalid_move = -1U [static, protected]
 

used to mark the ends of the Move linked lists

Definition at line 10 of file MotionSequenceEngine.cc.

Referenced by getOutputCmd(), setNextFrameTime(), and setOutputCmd().

unsigned int MotionSequenceEngine::lasttime [protected]
 

the time of the last update

Definition at line 187 of file MotionSequenceEngine.h.

Referenced by MotionSequenceEngine(), resume(), and updateOutputs().

float MotionSequenceEngine::loadSaveMode [protected]
 

1 to use radians, M_PI/180 for degrees during a save

Definition at line 192 of file MotionSequenceEngine.h.

Referenced by getBinSize(), isSaveDegrees(), isSaveRadians(), LoadBuffer(), MotionSequenceEngine(), SaveBuffer(), setSaveDegrees(), and setSaveRadians().

Move_idx_t MotionSequenceEngine::nexts[NumOutputs] [protected]
 

the upcoming frame (the starttime for this frame will always be greater than playtime)

Definition at line 183 of file MotionSequenceEngine.h.

Referenced by getOutputCmd(), setOutputCmd(), and setTime().

bool MotionSequenceEngine::playing [protected]
 

true if playing, false if paused

Definition at line 190 of file MotionSequenceEngine.h.

Referenced by isPlaying(), MotionSequenceEngine(), pause(), and resume().

float MotionSequenceEngine::playspeed [protected]
 

multiplies the difference between current time and starttime, negative will cause play backwards

Definition at line 189 of file MotionSequenceEngine.h.

Referenced by getSpeed(), isPlaying(), MotionSequenceEngine(), play(), setSpeed(), and updateOutputs().

unsigned int MotionSequenceEngine::playtime [protected]
 

the current time of playback, 0 is start of sequence

Definition at line 186 of file MotionSequenceEngine.h.

Referenced by advanceTime(), getOutputCmd(), getTime(), LoadBuffer(), MotionSequenceEngine(), setOutputCmd(), setTime(), and updateOutputs().

Move_idx_t MotionSequenceEngine::prevs[NumOutputs] [protected]
 

the previous frame (the starttime for this frame will always be less than or equal to playtime)

Definition at line 182 of file MotionSequenceEngine.h.

Referenced by getOutputCmd(), setOutputCmd(), and setTime().

Move_idx_t MotionSequenceEngine::starts[NumOutputs] [protected]
 

the beginning frame for each output animation

Definition at line 181 of file MotionSequenceEngine.h.

Referenced by compress(), getBinSize(), makeSafe(), resume(), and SaveBuffer().


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

Tekkotsu v2.2.2
Generated Tue Jan 4 15:45:28 2005 by Doxygen 1.4.0