Main Page   Class Hierarchy   Compound List   Compound Members  

ArActionKeydrive Class Reference

This action will use the keyboard arrow keys for input to drive the robot. More...

#include <ArActionKeydrive.h>

Inheritance diagram for ArActionKeydrive::

ArAction List of all members.

Public Methods

 ArActionKeydrive (const char *name="keydrive", double transVelMax=400, double turnAmountMax=24, double velIncrement=25, double turnIncrement=8)
 Constructor.

virtual ~ArActionKeydrive (void)
 Destructor.

virtual ArActionDesiredfire (ArActionDesired currentDesired)
 Fires the action, returning what the action wants to do. More...

void setSpeeds (double transVelMax, double turnAmountMax)
 For setting the maximum speeds.

void setIncrements (double velIncrement, double turnIncrement)
 For setting the increment amounts.

virtual ArActionDesiredgetDesired (void)
 Gets what this action wants to do (for display purposes).

virtual void setRobot (ArRobot *robot)
 Sets the robot this action is driving.

virtual void activate (void)
 Activate the action.

virtual void deactivate (void)
 Deactivate the action.

void takeKeys (void)
 Takes the keys this action wants to use to drive.

void giveUpKeys (void)
 Gives up the keys this action wants to use to drive.

void up (void)
 Internal, callback for up arrow.

void down (void)
 Internal, callback for down arrow.

void left (void)
 Internal, callback for left arrow.

void right (void)
 Internal, callback for right arrow.

void space (void)
 Internal, callback for space key.


Detailed Description

This action will use the keyboard arrow keys for input to drive the robot.


Member Function Documentation

ArActionDesired * ArActionKeydrive::fire ArActionDesired    currentDesired [virtual]
 

Fires the action, returning what the action wants to do.

Parameters:
currentDesired  this is what the current resolver has for its desired, this is SOLELY for the purpose of giving information to the action
Returns:
pointer to what this action wants to do, NULL if it wants to do nothing

Reimplemented from ArAction.


The documentation for this class was generated from the following files:
Generated on Tue Nov 12 17:43:48 2002 for Aria by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001