| Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
MotionSequenceMC< MAXMOVE > Class Template Reference#include <MotionSequenceMC.h>
Inheritance diagram for MotionSequenceMC< MAXMOVE >:
![]() Detailed Descriptiontemplate<unsigned int MAXMOVE>
Instantiates MotionSequenceEngines - when you want to run a motion sequence, make one of these.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Member Functions | |
| MotionSequenceMC () | |
| constructor | |
| MotionSequenceMC (const std::string &filename) | |
| constructor, loads from a file and then resets the playtime to beginning and begins to play | |
| virtual | ~MotionSequenceMC () |
| destructor | |
| virtual int | isDirty () |
| not used by MotionManager at the moment, but could be used to reduce recomputation, and you may find it useful | |
| virtual int | isAlive () |
| used to prune "dead" motions from the MotionManager | |
| virtual int | updateOutputs () |
| is called once per update cycle, can do any processing you need to change your priorities or set output commands on the MotionManager | |
| virtual void | clear () |
| empties out the sequence (constant time operation - faster than a series of pops) | |
| virtual unsigned int | getMaxFrames () const |
| 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 |
| returns the number of used key frames (Move's) which have been stored by the instantiation MotionSequenceEngine subclass | |
Static Public Attributes | |
| static const unsigned int | CAPACITY = MAXMOVE |
| allows recovery of capacity in a general way (MAXMOVE may, and probably will, be obscured by a typedef) | |
Protected Types | |
| typedef ListMemBuf< Move, MAXMOVE, Move_idx_t > | list_t |
| shorthand for the ListMemBuf that stores all of the movement frames | |
Protected Member Functions | |
| virtual Move & | getKeyFrame (Move_idx_t x) |
| returns moves[x] | |
| virtual const Move & | getKeyFrame (Move_idx_t x) const |
| returns moves[x] | |
| virtual Move_idx_t | newKeyFrame () |
| causes subclass to create a new Move structure, returns its index | |
| virtual void | eraseKeyFrame (Move_idx_t x) |
| marks keyframe x unused | |
| bool | setRange (unsigned int t, Move_idx_t &prev, Move_idx_t &next) const |
| advances (or rewinds) prev and next so that t falls between them | |
Protected Attributes | |
| list_t | moves |
| stores all of the movement keyframes | |
| bool | lastDirty |
| true if last updateOutputs was dirty, so we know when to post status event | |
typedef ListMemBuf<Move,MAXMOVE,Move_idx_t> MotionSequenceMC< MAXMOVE >::list_t [protected] |
shorthand for the ListMemBuf that stores all of the movement frames
Definition at line 93 of file MotionSequenceMC.h.
| MotionSequenceMC< MAXMOVE >::MotionSequenceMC | ( | ) | [inline] |
| MotionSequenceMC< MAXMOVE >::MotionSequenceMC | ( | const std::string & | filename | ) | [inline, explicit] |
constructor, loads from a file and then resets the playtime to beginning and begins to play
Definition at line 27 of file MotionSequenceMC.h.
| virtual MotionSequenceMC< MAXMOVE >::~MotionSequenceMC | ( | ) | [inline, virtual] |
| virtual int MotionSequenceMC< MAXMOVE >::isDirty | ( | ) | [inline, virtual] |
not used by MotionManager at the moment, but could be used to reduce recomputation, and you may find it useful
Implements MotionCommand.
Definition at line 37 of file MotionSequenceMC.h.
| virtual int MotionSequenceMC< MAXMOVE >::isAlive | ( | ) | [inline, virtual] |
used to prune "dead" motions from the MotionManager
note that a motion could be "paused" or inactive and therefore not dirty, but still alive, biding its time to "strike" ;)
Implements MotionCommand.
Definition at line 38 of file MotionSequenceMC.h.
| virtual int MotionSequenceMC< MAXMOVE >::updateOutputs | ( | ) | [inline, virtual] |
is called once per update cycle, can do any processing you need to change your priorities or set output commands on the MotionManager
RobotInfo::FrameTime
Implements MotionCommand.
Definition at line 41 of file MotionSequenceMC.h.
| virtual void MotionSequenceMC< MAXMOVE >::clear | ( | ) | [inline, virtual] |
empties out the sequence (constant time operation - faster than a series of pops)
Implements MotionSequenceEngine.
Definition at line 75 of file MotionSequenceMC.h.
Referenced by MotionSequenceMC< MAXMOVE >::MotionSequenceMC().
| virtual unsigned int MotionSequenceMC< MAXMOVE >::getMaxFrames | ( | ) | const [inline, virtual] |
returns the maximum number of key frames (Move's) which can be stored, determined by the instantiating MotionSequenceMC's template parameter
Implements MotionSequenceEngine.
Definition at line 88 of file MotionSequenceMC.h.
| virtual unsigned int MotionSequenceMC< MAXMOVE >::getUsedFrames | ( | ) | const [inline, virtual] |
returns the number of used key frames (Move's) which have been stored by the instantiation MotionSequenceEngine subclass
Implements MotionSequenceEngine.
Definition at line 89 of file MotionSequenceMC.h.
| virtual Move& MotionSequenceMC< MAXMOVE >::getKeyFrame | ( | Move_idx_t | x | ) | [inline, protected, virtual] |
| virtual const Move& MotionSequenceMC< MAXMOVE >::getKeyFrame | ( | Move_idx_t | x | ) | const [inline, protected, virtual] |
| virtual Move_idx_t MotionSequenceMC< MAXMOVE >::newKeyFrame | ( | ) | [inline, protected, virtual] |
causes subclass to create a new Move structure, returns its index
Implements MotionSequenceEngine.
Definition at line 101 of file MotionSequenceMC.h.
| virtual void MotionSequenceMC< MAXMOVE >::eraseKeyFrame | ( | Move_idx_t | x | ) | [inline, protected, virtual] |
| bool MotionSequenceMC< MAXMOVE >::setRange | ( | unsigned int | t, | |
| Move_idx_t & | prev, | |||
| Move_idx_t & | next | |||
| ) | const [inline, protected] |
advances (or rewinds) prev and next so that t falls between them
Definition at line 110 of file MotionSequenceMC.h.
Referenced by MotionSequenceMC< MAXMOVE >::updateOutputs().
const unsigned int MotionSequenceMC< MAXMOVE >::CAPACITY = MAXMOVE [static] |
allows recovery of capacity in a general way (MAXMOVE may, and probably will, be obscured by a typedef)
Definition at line 18 of file MotionSequenceMC.h.
list_t MotionSequenceMC< MAXMOVE >::moves [protected] |
stores all of the movement keyframes
Definition at line 96 of file MotionSequenceMC.h.
Referenced by MotionSequenceMC< MAXMOVE >::clear(), MotionSequenceMC< MAXMOVE >::eraseKeyFrame(), MotionSequenceMC< MAXMOVE >::getKeyFrame(), MotionSequenceMC< MAXMOVE >::getMaxFrames(), MotionSequenceMC< MAXMOVE >::getUsedFrames(), MotionSequenceMC< MAXMOVE >::newKeyFrame(), MotionSequenceMC< MAXMOVE >::setRange(), and MotionSequenceMC< MAXMOVE >::updateOutputs().
bool MotionSequenceMC< MAXMOVE >::lastDirty [protected] |
true if last updateOutputs was dirty, so we know when to post status event
Definition at line 97 of file MotionSequenceMC.h.
Referenced by MotionSequenceMC< MAXMOVE >::updateOutputs().
|
Tekkotsu v4.0 |
Generated Thu Nov 22 00:58:33 2007 by Doxygen 1.5.4 |