Homepage Demos Overview Downloads Tutorials Reference
Credits

WalkNode Class Reference

#include <WalkNode.h>

Inheritance diagram for WalkNode:

Inheritance graph
[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 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]
 

constructor

Definition at line 14 of file WalkNode.h.

WalkNode::WalkNode float  xvel,
float  yvel,
float  avel,
StateNode p = NULL
[inline]
 

constructor, positive is counter-clockwise from above (to match coordinate system)

Definition at line 21 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 53 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 58 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 51 of file WalkNode.h.

virtual MotionManager::MC_ID WalkNode::getWalkID  )  [inline, virtual]
 

use this to access the WalkMC that the WalkNode is using

Definition at line 82 of file WalkNode.h.

float WalkNode::getXVelocity  )  [inline]
 

returns the velocity in x direction (positive is forward)

Definition at line 39 of file WalkNode.h.

float WalkNode::getYVelocity  )  [inline]
 

returns the velocity in y direction (positive is forward)

Definition at line 45 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 85 of file WalkNode.h.

void WalkNode::setAVelocity float  avel  )  [inline]
 

sets the velocity of the turn, positive is counter-clockwise from above (to match coordinate system)

Definition at line 48 of file WalkNode.h.

Referenced by ExploreMachine::processEvent().

void WalkNode::setVelocity float  xvel,
float  yvel,
float  avel
[inline]
 

sets the velocity of the walk

Definition at line 28 of file WalkNode.h.

virtual void WalkNode::setWalkID MotionManager::MC_ID  id  )  [inline, virtual]
 

use this to force the WalkNode to use a shared WalkMC - set to MotionManager::invalid_MC_ID to reset to internally generated walk

Definition at line 72 of file WalkNode.h.

Referenced by ExploreMachine::setup().

void WalkNode::setXVelocity float  xvel  )  [inline]
 

sets the velocity in x direction (positive is forward)

Definition at line 36 of file WalkNode.h.

void WalkNode::setYVelocity float  yvel  )  [inline]
 

sets the velocity in y direction (positive is forward)

Definition at line 42 of file WalkNode.h.

virtual void WalkNode::teardown  )  [inline, virtual]
 

removes walkid if walkidIsMine

Reimplemented from StateNode.

Definition at line 64 of file WalkNode.h.

void WalkNode::updateWalk float  xvel,
float  yvel,
float  avel
[inline, protected]
 

if the walk is invalid, create; then set xya

Definition at line 89 of file WalkNode.h.

Referenced by DoStart(), DoStop(), setAVelocity(), setVelocity(), setXVelocity(), and setYVelocity().


Member Data Documentation

float WalkNode::a [protected]
 

velocity of the turn, positive is counter-clockwise from above (to match coordinate system)

Definition at line 105 of file WalkNode.h.

Referenced by DoStart(), setAVelocity(), setVelocity(), setXVelocity(), setYVelocity(), and WalkNode().

MotionManager::MC_ID WalkNode::walkid [protected]
 

the current WalkMC

Definition at line 101 of file WalkNode.h.

Referenced by setWalkID(), teardown(), updateWalk(), and WalkNode().

bool WalkNode::walkidIsMine [protected]
 

true if the walk was created in updateWalk (instead of assigned externally)

Definition at line 102 of file WalkNode.h.

Referenced by setWalkID(), updateWalk(), and WalkNode().

float WalkNode::x [protected]
 

velocity in x direction (positive is forward)

Definition at line 103 of file WalkNode.h.

Referenced by DoStart(), setAVelocity(), setVelocity(), setXVelocity(), setYVelocity(), and WalkNode().

float WalkNode::y [protected]
 

velocity in y direction (positive is dog's left)

Definition at line 104 of file WalkNode.h.

Referenced by DoStart(), setAVelocity(), setVelocity(), setXVelocity(), setYVelocity(), and WalkNode().


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

Tekkotsu v2.2
Generated Tue Oct 19 14:20:25 2004 by Doxygen 1.3.9.1