WalkNode Class Reference#include <WalkNode.h>
Inheritance diagram for WalkNode:
[legend]List of all members.
Detailed Description
A StateNode for walking in a direction.
Definition at line 11 of file WalkNode.h.
|
Public Member Functions |
| WalkNode (StateNode *p=NULL) |
| constructor
|
| WalkNode (float xvel, float yvel, float avel, StateNode *p=NULL) |
| constructor, positive yvel is counter-clockwise from above (to match coordinate system)
|
| WalkNode (const std::string &name, float xvel, float yvel, float avel, StateNode *p=NULL) |
| constructor, positive yvel is counter-clockwise from above (to match coordinate system)
|
void | setVelocity (float xvel, float yvel, float avel) |
| sets the velocity of the walk
|
void | setXVelocity (float xvel) |
| sets the velocity in x direction (positive is forward)
|
float | getXVelocity () |
| returns the velocity in x direction (positive is forward)
|
void | setYVelocity (float yvel) |
| sets the velocity in y direction (positive is forward)
|
float | getYVelocity () |
| returns the velocity in y direction (positive is forward)
|
void | setAVelocity (float avel) |
| sets the velocity of the turn, positive is counter-clockwise from above (to match coordinate system)
|
float | getAVelocity () |
| returns the velocity of the turn, positive is counter-clockwise from above (to match coordinate system)
|
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 () |
| removes walkid if walkidIsMine
|
virtual void | setWalkID (MotionManager::MC_ID id) |
| use this to force the WalkNode to use a shared WalkMC - set to MotionManager::invalid_MC_ID to reset to internally generated walk
|
virtual MotionManager::MC_ID | getWalkID () |
| use this to access the WalkMC that the WalkNode is using
|
virtual bool | ownsWalkID () |
| returns true if walkid was created (and will be destroyed) by this WalkNode - false if assigned by setWalkID()
|
Protected Member Functions |
void | updateWalk (float xvel, float yvel, float avel) |
| if the walk is invalid, create; then set xya
|
Protected Attributes |
MotionManager::MC_ID | walkid |
| the current WalkMC
|
bool | walkidIsMine |
| true if the walk was created in updateWalk (instead of assigned externally)
|
float | x |
| velocity in x direction (positive is forward)
|
float | y |
| velocity in y direction (positive is dog's left)
|
float | a |
| velocity of the turn, positive is counter-clockwise from above (to match coordinate system)
|
Constructor & Destructor Documentation
WalkNode::WalkNode |
( |
StateNode * |
p = NULL |
) |
[inline] |
|
WalkNode::WalkNode |
( |
float |
xvel, |
|
|
float |
yvel, |
|
|
float |
avel, |
|
|
StateNode * |
p = NULL |
|
) |
[inline] |
|
|
constructor, positive yvel is counter-clockwise from above (to match coordinate system)
Definition at line 21 of file WalkNode.h. |
WalkNode::WalkNode |
( |
const std::string & |
name, |
|
|
float |
xvel, |
|
|
float |
yvel, |
|
|
float |
avel, |
|
|
StateNode * |
p = NULL |
|
) |
[inline] |
|
|
constructor, positive yvel is counter-clockwise from above (to match coordinate system)
Definition at line 28 of file WalkNode.h. |
Member Function Documentation
virtual void WalkNode::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 60 of file WalkNode.h. |
virtual void WalkNode::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 65 of file WalkNode.h. |
float WalkNode::getAVelocity |
( |
|
) |
[inline] |
|
|
returns the velocity of the turn, positive is counter-clockwise from above (to match coordinate system)
Definition at line 58 of file WalkNode.h. |
|
use this to access the WalkMC that the WalkNode is using
Definition at line 89 of file WalkNode.h. |
float WalkNode::getXVelocity |
( |
|
) |
[inline] |
|
|
returns the velocity in x direction (positive is forward)
Definition at line 46 of file WalkNode.h. |
float WalkNode::getYVelocity |
( |
|
) |
[inline] |
|
|
returns the velocity in y direction (positive is forward)
Definition at line 52 of file WalkNode.h. |
virtual bool WalkNode::ownsWalkID |
( |
|
) |
[inline, virtual] |
|
|
returns true if walkid was created (and will be destroyed) by this WalkNode - false if assigned by setWalkID()
Definition at line 92 of file WalkNode.h. |
void WalkNode::setAVelocity |
( |
float |
avel |
) |
[inline] |
|
void WalkNode::setVelocity |
( |
float |
xvel, |
|
|
float |
yvel, |
|
|
float |
avel |
|
) |
[inline] |
|
|
sets the velocity of the walk
Definition at line 35 of file WalkNode.h. |
void WalkNode::setXVelocity |
( |
float |
xvel |
) |
[inline] |
|
|
sets the velocity in x direction (positive is forward)
Definition at line 43 of file WalkNode.h. |
void WalkNode::setYVelocity |
( |
float |
yvel |
) |
[inline] |
|
|
sets the velocity in y direction (positive is forward)
Definition at line 49 of file WalkNode.h. |
virtual void WalkNode::teardown |
( |
|
) |
[inline, virtual] |
|
void WalkNode::updateWalk |
( |
float |
xvel, |
|
|
float |
yvel, |
|
|
float |
avel |
|
) |
[inline, protected] |
|
Member Data Documentation
The documentation for this class was generated from the following file:
|