AURobotServers
4
|
#include <ureactivepath.h>
Public Member Functions | |
void | clear () |
int | getCnt () |
int | getMaxSize () |
UObstacle * | getObst (int index) |
int | getObstInfo (UObstacle *ob) |
void | print (const char *prestring) |
bool | setObstInfo (UObstacle *ob, int value) |
UObstInfo () | |
~UObstInfo () | |
Protected Attributes | |
int | info [LIST_SIZE] |
int | listMax |
UObstacle * | obst [LIST_SIZE] |
int | obstCnt |
Static Protected Attributes | |
static const int | LIST_SIZE = 100 |
Class to hold a set of obstacle pointers and an associated value. The value could be the side by witch the obstacle has to be passed.
UObstInfo::UObstInfo | ( | ) |
Constructor
References UReacRoadLines::clear().
UObstInfo::~UObstInfo | ( | ) |
Destructor
|
inline |
Remove all info
|
inline |
Get count of obstacle list
|
inline |
Get max list size
int UObstInfo::getObstInfo | ( | UObstacle * | ob | ) |
Get obstacle info for this obstacle. Returns -1 if not found, otherwise returns stored info.
Referenced by UReactivePath::avoidObst(), and UReactivePath::getNearObstacle().
void UObstInfo::print | ( | const char * | prestring | ) |
Print status of obstacle info
References UPosition::x, and UPosition::y.
bool UObstInfo::setObstInfo | ( | UObstacle * | ob, |
int | value | ||
) |
Set obstacle info for this obstacle. Info should not be '-1', as this signals 'no info'.
Referenced by UReactivePath::avoidObst().
|
protected |
Value associated with pointer
|
staticprotected |
|
protected |
Size of list
|
protected |
Number of pointers stored