This class defined motor actions for the Beobots. More...
#include <Beobot/BeobotAction.H>
Public Member Functions | |
BeobotAction () | |
no arg constructor | |
BeobotAction (const float t, const float s, const int g) | |
constructor | |
BeobotAction (const BeobotAction &other) | |
copy constructor | |
BeobotAction & | operator= (const BeobotAction &other) |
Assignment constructor. | |
float | getTurn () const |
access function | |
float | getSpeed () const |
access function | |
int | getGear () const |
access function | |
void | setTurn (const float t) |
access function | |
void | setSpeed (const float s) |
access function | |
void | setGear (const int g) |
access function | |
~BeobotAction () | |
destructor |
This class defined motor actions for the Beobots.
Turn is between -1.0 (full left) and 1.0 (full right), speed is between -1.0 (full reverse) and 1.0 (full forward), and gear is 0 (neutral), 1 or 2.
Definition at line 49 of file BeobotAction.H.
BeobotAction::BeobotAction | ( | ) | [inline] |
no arg constructor
Definition at line 99 of file BeobotAction.H.
BeobotAction::BeobotAction | ( | const float | t, | |
const float | s, | |||
const int | g | |||
) | [inline] |
constructor
Definition at line 107 of file BeobotAction.H.
References setGear(), setSpeed(), and setTurn().
BeobotAction::BeobotAction | ( | const BeobotAction & | other | ) | [inline] |
copy constructor
Definition at line 103 of file BeobotAction.H.
BeobotAction::~BeobotAction | ( | ) | [inline] |
destructor
Definition at line 115 of file BeobotAction.H.
int BeobotAction::getGear | ( | ) | const [inline] |
access function
Definition at line 127 of file BeobotAction.H.
Referenced by BeobotEffectors::performAction().
float BeobotAction::getSpeed | ( | ) | const [inline] |
access function
Definition at line 123 of file BeobotAction.H.
Referenced by BeobotMemory::generatePresentAction(), main(), and BeobotEffectors::performAction().
float BeobotAction::getTurn | ( | ) | const [inline] |
access function
Definition at line 119 of file BeobotAction.H.
Referenced by BeobotMemory::generatePresentAction(), main(), and BeobotEffectors::performAction().
BeobotAction & BeobotAction::operator= | ( | const BeobotAction & | other | ) | [inline] |
Assignment constructor.
Definition at line 111 of file BeobotAction.H.
void BeobotAction::setGear | ( | const int | g | ) | [inline] |
access function
Definition at line 145 of file BeobotAction.H.
Referenced by BeobotAction(), BeobotMemory::generatePresentAction(), Beobot::highLevel(), and main().
void BeobotAction::setSpeed | ( | const float | s | ) | [inline] |
access function
Definition at line 138 of file BeobotAction.H.
Referenced by BeobotAction(), BeobotMemory::generatePresentAction(), Beobot::highLevel(), and main().
void BeobotAction::setTurn | ( | const float | t | ) | [inline] |
access function
Definition at line 131 of file BeobotAction.H.
Referenced by BeobotAction(), BeobotMemory::generatePresentAction(), Beobot::highLevel(), and main().