Homepage Demos Overview Downloads Tutorials Reference
Credits

PlayMotionSequenceNode< SIZE > Class Template Reference

#include <PlayMotionSequenceNode.h>

Inheritance diagram for PlayMotionSequenceNode< SIZE >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<unsigned int SIZE>
class PlayMotionSequenceNode< 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 13 of file PlayMotionSequenceNode.h.

Public Member Functions

 PlayMotionSequenceNode ()
 constructor
 PlayMotionSequenceNode (const std::string &nm, StateNode *par, const std::string &file, bool loop=false)
 constructor
virtual void setup ()
 This is called by DoStart() when you should setup the network of subnodes.
virtual void DoStart ()
 Transitions should call this when you are entering the state, so it can enable its transitions.
virtual void DoStop ()
 Transitions should call this when you are leaving the state, so it can disable its transitions.
virtual void teardown ()
 This is called by DoStop() when you should destruct subnodes.
virtual void setFile (const std::string &file)
 sets the file to play
virtual void setLooping (bool loop)
 turns looping on or off
virtual void processEvent (const EventBase &e)
 By defining here, allows you to get away with not supplying a processEvent() function for the EventListener interface. By default, does nothing.
virtual bool getLooping ()
 returns true if currently looping
virtual MotionManager::MC_ID getMSid ()
 use this to access the MS that the PlayMotionSequenceNode is using
virtual MMAccessor< MotionSequenceMC<
SIZE > > 
getMSAccessor ()
 use this to access the MS that the PlayMotionSequenceNode is using
virtual bool ownsMSid ()
 returns true if msid was created (and will be destroyed) by this PlayMotionSequenceNode - false if assigned by setMsid()

Protected Member Functions

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

Protected Attributes

MotionManager::MC_ID msid
 id of the motion command
bool msidIsMine
 true if this class created the current motion command (and therefore should delete it when done)
bool looping
 true if we should loop
std::string filename
 filename of current motion sequence


Constructor & Destructor Documentation

template<unsigned int SIZE>
PlayMotionSequenceNode< SIZE >::PlayMotionSequenceNode  )  [inline]
 

constructor

Definition at line 16 of file PlayMotionSequenceNode.h.

template<unsigned int SIZE>
PlayMotionSequenceNode< SIZE >::PlayMotionSequenceNode const std::string &  nm,
StateNode par,
const std::string &  file,
bool  loop = false
[inline]
 

constructor

Definition at line 21 of file PlayMotionSequenceNode.h.


Member Function Documentation

template<unsigned int SIZE>
virtual void PlayMotionSequenceNode< SIZE >::DoStart  )  [inline, virtual]
 

Transitions should call this when you are entering the state, so it can enable its transitions.

Reimplemented from StateNode.

Definition at line 29 of file PlayMotionSequenceNode.h.

template<unsigned int SIZE>
virtual void PlayMotionSequenceNode< SIZE >::DoStop  )  [inline, virtual]
 

Transitions should call this when you are leaving the state, so it can disable its transitions.

Reimplemented from StateNode.

Definition at line 36 of file PlayMotionSequenceNode.h.

template<unsigned int SIZE>
virtual bool PlayMotionSequenceNode< SIZE >::getLooping  )  [inline, virtual]
 

returns true if currently looping

Definition at line 86 of file PlayMotionSequenceNode.h.

template<unsigned int SIZE>
virtual MMAccessor<MotionSequenceMC<SIZE> > PlayMotionSequenceNode< SIZE >::getMSAccessor  )  [inline, virtual]
 

use this to access the MS that the PlayMotionSequenceNode is using

Definition at line 92 of file PlayMotionSequenceNode.h.

template<unsigned int SIZE>
virtual MotionManager::MC_ID PlayMotionSequenceNode< SIZE >::getMSid  )  [inline, virtual]
 

use this to access the MS that the PlayMotionSequenceNode is using

Definition at line 89 of file PlayMotionSequenceNode.h.

template<unsigned int SIZE>
virtual bool PlayMotionSequenceNode< SIZE >::ownsMSid  )  [inline, virtual]
 

returns true if msid was created (and will be destroyed) by this PlayMotionSequenceNode - false if assigned by setMsid()

Definition at line 95 of file PlayMotionSequenceNode.h.

template<unsigned int SIZE>
virtual void PlayMotionSequenceNode< SIZE >::processEvent const EventBase e  )  [inline, virtual]
 

By defining here, allows you to get away with not supplying a processEvent() function for the EventListener interface. By default, does nothing.

Reimplemented from BehaviorBase.

Definition at line 74 of file PlayMotionSequenceNode.h.

template<unsigned int SIZE>
virtual void PlayMotionSequenceNode< SIZE >::setFile const std::string &  file  )  [inline, virtual]
 

sets the file to play

Definition at line 64 of file PlayMotionSequenceNode.h.

template<unsigned int SIZE>
virtual void PlayMotionSequenceNode< SIZE >::setLooping bool  loop  )  [inline, virtual]
 

turns looping on or off

Definition at line 72 of file PlayMotionSequenceNode.h.

Referenced by PlayMotionSequenceNode< SIZE >::PlayMotionSequenceNode().

template<unsigned int SIZE>
virtual void PlayMotionSequenceNode< SIZE >::setup  )  [inline, virtual]
 

This is called by DoStart() when you should setup the network of subnodes.

Reimplemented from StateNode.

Definition at line 27 of file PlayMotionSequenceNode.h.

template<unsigned int SIZE>
virtual void PlayMotionSequenceNode< SIZE >::teardown  )  [inline, virtual]
 

This is called by DoStop() when you should destruct subnodes.

Reimplemented from StateNode.

Definition at line 44 of file PlayMotionSequenceNode.h.

template<unsigned int SIZE>
void PlayMotionSequenceNode< SIZE >::updateMS const std::string &  file  )  [inline, protected]
 

resets the motion command and starts it playing

Definition at line 99 of file PlayMotionSequenceNode.h.

Referenced by PlayMotionSequenceNode< SIZE >::DoStart(), PlayMotionSequenceNode< SIZE >::processEvent(), and PlayMotionSequenceNode< SIZE >::setFile().


Member Data Documentation

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

filename of current motion sequence

Definition at line 115 of file PlayMotionSequenceNode.h.

Referenced by PlayMotionSequenceNode< SIZE >::DoStart(), PlayMotionSequenceNode< SIZE >::PlayMotionSequenceNode(), PlayMotionSequenceNode< SIZE >::processEvent(), PlayMotionSequenceNode< SIZE >::setFile(), and PlayMotionSequenceNode< SIZE >::updateMS().

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

true if we should loop

Definition at line 114 of file PlayMotionSequenceNode.h.

Referenced by PlayMotionSequenceNode< SIZE >::PlayMotionSequenceNode(), and PlayMotionSequenceNode< SIZE >::setLooping().

template<unsigned int SIZE>
MotionManager::MC_ID PlayMotionSequenceNode< SIZE >::msid [protected]
 

id of the motion command

Definition at line 112 of file PlayMotionSequenceNode.h.

Referenced by PlayMotionSequenceNode< SIZE >::DoStop(), PlayMotionSequenceNode< SIZE >::PlayMotionSequenceNode(), PlayMotionSequenceNode< SIZE >::processEvent(), PlayMotionSequenceNode< SIZE >::teardown(), and PlayMotionSequenceNode< SIZE >::updateMS().

template<unsigned int SIZE>
bool PlayMotionSequenceNode< SIZE >::msidIsMine [protected]
 

true if this class created the current motion command (and therefore should delete it when done)

Definition at line 113 of file PlayMotionSequenceNode.h.

Referenced by PlayMotionSequenceNode< SIZE >::PlayMotionSequenceNode(), and PlayMotionSequenceNode< SIZE >::updateMS().


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

Tekkotsu v2.2.1
Generated Tue Nov 23 16:37:50 2004 by Doxygen 1.3.9.1