Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

MotionSequenceNode< SIZE > Class Template Reference

A StateNode for playing a MotionSequence (and looping it if desired). More...

#include <MotionSequenceNode.h>

Inheritance diagram for MotionSequenceNode< SIZE >:

Detailed Description

template<unsigned int SIZE>
class MotionSequenceNode< SIZE >

A StateNode for playing a MotionSequence (and looping it if desired).

Eventually, i'd like to just build the looping functionality into MotionSequence, but in the mean time we have this.

Definition at line 22 of file MotionSequenceNode.h.

List of all members.

Public Member Functions

 MotionSequenceNode ()
 constructor
 MotionSequenceNode (const std::string &name, const std::string &file="", bool loop=false)
 constructor
virtual void preStart ()
 Adds the motion command to the motion manager, but stops it from running until the user has a chance to program it.
virtual void postStart ()
 Adds a listener and then starts the motion command.
virtual void setFile (const std::string &file)
 sets the file to play
virtual void setLooping (bool loop)
 turns looping on or off
virtual void doEvent ()
 Assumes the event is a completion event from the motion, throws a corresponding state node completion event.
virtual bool getLooping ()
 returns true if currently looping

Protected Member Functions

void update (const std::string &file)
 resets the motion command and starts it playing

Protected Attributes

bool looping
 true if we should loop
std::string filename
 filename of current motion sequence

Constructor & Destructor Documentation

template<unsigned int SIZE>
MotionSequenceNode< SIZE >::MotionSequenceNode (  ) 

constructor

Definition at line 25 of file MotionSequenceNode.h.

template<unsigned int SIZE>
MotionSequenceNode< SIZE >::MotionSequenceNode ( const std::string &  name,
const std::string &  file = "",
bool  loop = false 
)

constructor

Definition at line 30 of file MotionSequenceNode.h.


Member Function Documentation

template<unsigned int SIZE>
virtual void MotionSequenceNode< SIZE >::doEvent (  )  [virtual]

Assumes the event is a completion event from the motion, throws a corresponding state node completion event.

Reimplemented from MCNodeBase.

Definition at line 57 of file MotionSequenceNode.h.

template<unsigned int SIZE>
virtual bool MotionSequenceNode< SIZE >::getLooping (  )  [virtual]

returns true if currently looping

Definition at line 67 of file MotionSequenceNode.h.

template<unsigned int SIZE>
virtual void MotionSequenceNode< SIZE >::postStart (  )  [virtual]

Adds a listener and then starts the motion command.

Reimplemented from MCNode< MotionSequenceMC< SIZE >, defMotionSequenceNodeName, defMotionSequenceNodeDesc, true >.

Definition at line 41 of file MotionSequenceNode.h.

template<unsigned int SIZE>
virtual void MotionSequenceNode< SIZE >::preStart (  )  [virtual]

Adds the motion command to the motion manager, but stops it from running until the user has a chance to program it.

Reimplemented from MCNode< MotionSequenceMC< SIZE >, defMotionSequenceNodeName, defMotionSequenceNodeDesc, true >.

Definition at line 34 of file MotionSequenceNode.h.

template<unsigned int SIZE>
virtual void MotionSequenceNode< SIZE >::setFile ( const std::string &  file  )  [virtual]

sets the file to play

Definition at line 47 of file MotionSequenceNode.h.

template<unsigned int SIZE>
virtual void MotionSequenceNode< SIZE >::setLooping ( bool  loop  )  [virtual]

turns looping on or off

Definition at line 55 of file MotionSequenceNode.h.

template<unsigned int SIZE>
void MotionSequenceNode< SIZE >::update ( const std::string &  file  )  [protected]

resets the motion command and starts it playing

Definition at line 72 of file MotionSequenceNode.h.

Referenced by MotionSequenceNode< SIZE >::preStart(), and MotionSequenceNode< SIZE >::setFile().


Member Data Documentation

template<unsigned int SIZE>
std::string MotionSequenceNode< SIZE >::filename [protected]

filename of current motion sequence

Definition at line 83 of file MotionSequenceNode.h.

Referenced by MotionSequenceNode< SIZE >::preStart(), MotionSequenceNode< SIZE >::setFile(), and MotionSequenceNode< SIZE >::update().

template<unsigned int SIZE>
bool MotionSequenceNode< SIZE >::looping [protected]

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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:13 2016 by Doxygen 1.6.3