Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
MotionSequenceNode< SIZE > Class Template Reference#include <MotionSequenceNode.h>
Inheritance diagram for MotionSequenceNode< SIZE >:
![]() Detailed Descriptiontemplate<unsigned int SIZE>
A StateNode for playing a MotionSequence (and looping it if desired).
|
Public Member Functions | |
MotionSequenceNode () | |
constructor | |
MotionSequenceNode (const std::string &nm, const std::string &file, bool loop=false) | |
constructor | |
~MotionSequenceNode () | |
destructor, check if we need to call our teardown | |
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 MotionSequenceNode is using | |
virtual MMAccessor < MotionSequenceMC< SIZE > > | getMSAccessor () |
use this to access the MS that the MotionSequenceNode is using | |
virtual bool | ownsMSid () |
returns true if msid was created (and will be destroyed) by this MotionSequenceNode - 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 |
MotionSequenceNode< SIZE >::MotionSequenceNode | ( | ) | [inline] |
MotionSequenceNode< SIZE >::MotionSequenceNode | ( | const std::string & | nm, | |
const std::string & | file, | |||
bool | loop = false | |||
) | [inline] |
MotionSequenceNode< SIZE >::~MotionSequenceNode | ( | ) | [inline] |
destructor, check if we need to call our teardown
Definition at line 30 of file MotionSequenceNode.h.
virtual void MotionSequenceNode< 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 35 of file MotionSequenceNode.h.
virtual void MotionSequenceNode< 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 42 of file MotionSequenceNode.h.
virtual void MotionSequenceNode< SIZE >::teardown | ( | ) | [inline, virtual] |
This is called by DoStop() when you should destruct subnodes.
Default implementation will take care of the subnodes and their transitions, you only need to worry about any *other* memory which may have been allocated. If none, you may not need implement this function at all.
Reimplemented from StateNode.
Definition at line 50 of file MotionSequenceNode.h.
Referenced by MotionSequenceNode< SIZE >::~MotionSequenceNode().
virtual void MotionSequenceNode< SIZE >::setFile | ( | const std::string & | file | ) | [inline, virtual] |
virtual void MotionSequenceNode< SIZE >::setLooping | ( | bool | loop | ) | [inline, virtual] |
turns looping on or off
Definition at line 79 of file MotionSequenceNode.h.
Referenced by MotionSequenceNode< SIZE >::MotionSequenceNode().
virtual void MotionSequenceNode< SIZE >::processEvent | ( | const EventBase & | ) | [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 81 of file MotionSequenceNode.h.
virtual bool MotionSequenceNode< SIZE >::getLooping | ( | ) | [inline, virtual] |
virtual MotionManager::MC_ID MotionSequenceNode< SIZE >::getMSid | ( | ) | [inline, virtual] |
use this to access the MS that the MotionSequenceNode is using
Definition at line 96 of file MotionSequenceNode.h.
virtual MMAccessor<MotionSequenceMC<SIZE> > MotionSequenceNode< SIZE >::getMSAccessor | ( | ) | [inline, virtual] |
use this to access the MS that the MotionSequenceNode is using
Definition at line 99 of file MotionSequenceNode.h.
virtual bool MotionSequenceNode< SIZE >::ownsMSid | ( | ) | [inline, virtual] |
returns true if msid was created (and will be destroyed) by this MotionSequenceNode - false if assigned by setMsid()
Definition at line 102 of file MotionSequenceNode.h.
void MotionSequenceNode< SIZE >::updateMS | ( | const std::string & | file | ) | [inline, protected] |
resets the motion command and starts it playing
Definition at line 106 of file MotionSequenceNode.h.
Referenced by MotionSequenceNode< SIZE >::DoStart(), MotionSequenceNode< SIZE >::processEvent(), and MotionSequenceNode< SIZE >::setFile().
MotionManager::MC_ID MotionSequenceNode< SIZE >::msid [protected] |
id of the motion command
Definition at line 119 of file MotionSequenceNode.h.
Referenced by MotionSequenceNode< SIZE >::DoStop(), MotionSequenceNode< SIZE >::getMSAccessor(), MotionSequenceNode< SIZE >::getMSid(), MotionSequenceNode< SIZE >::processEvent(), MotionSequenceNode< SIZE >::teardown(), and MotionSequenceNode< SIZE >::updateMS().
bool MotionSequenceNode< SIZE >::msidIsMine [protected] |
true if this class created the current motion command (and therefore should delete it when done)
Definition at line 120 of file MotionSequenceNode.h.
Referenced by MotionSequenceNode< SIZE >::ownsMSid(), MotionSequenceNode< SIZE >::teardown(), and MotionSequenceNode< SIZE >::updateMS().
bool MotionSequenceNode< SIZE >::looping [protected] |
true if we should loop
Definition at line 121 of file MotionSequenceNode.h.
Referenced by MotionSequenceNode< SIZE >::getLooping(), MotionSequenceNode< SIZE >::processEvent(), and MotionSequenceNode< SIZE >::setLooping().
std::string MotionSequenceNode< SIZE >::filename [protected] |
filename of current motion sequence
Definition at line 122 of file MotionSequenceNode.h.
Referenced by MotionSequenceNode< SIZE >::DoStart(), MotionSequenceNode< SIZE >::processEvent(), MotionSequenceNode< SIZE >::setFile(), and MotionSequenceNode< SIZE >::updateMS().
Tekkotsu v4.0 |
Generated Thu Nov 22 00:58:33 2007 by Doxygen 1.5.4 |