AURobotServers  4
Public Member Functions | Public Attributes | List of all members
UAvoidCell Class Reference

Public Member Functions

int getCellIdx (int nextID)
 
void getPoly (UPolygon *poly, double maxVal)
 
void init ()
 
bool isBack (int nextID)
 
bool isFwd (int nextID)
 
bool isInRightY (double y)
 is this y-value inside right side of cell More...
 
void link (UAvoidCell *arg1, UAvoidCell *arg2, UAvoidCell *arg3, UAvoidCell *arg4, bool openList)
 
void print (FILE *dest)
 
bool setCuts (double x, ULogFile *debugLog)
 
void setXLeft (double x)
 set x value for start positions More...
 
void setXRight (double x)
 set x value for start positions More...
 
 UAvoidCell ()
 
void unlinkOpen ()
 

Public Attributes

UAvoidCellcells [4]
 
int id
 ID of this cell. More...
 
UAvoidObstobsts [2]
 
U2Dpos oPoss [4]
 position of corner - if free space set to +/- 1e6 More...
 

Constructor & Destructor Documentation

UAvoidCell::UAvoidCell ( )
inline

Constructor

Member Function Documentation

int UAvoidCell::getCellIdx ( int  nextID)
inline

Is index to this ID

Parameters
nextIDis the cell ID to look for.
Returns
-1 if cell ID is not found.
0..3 if the cell ID is found.

Referenced by UAvoidCellGraph::findCellPointPath().

void UAvoidCell::getPoly ( UPolygon poly,
double  maxVal 
)
inline

Set cell corners into polygon

References UPolygon::add(), and UPolygon::setAsPolygon().

Referenced by UAvoidCellGraph::getCellPathPoly(), and UAvoidCellGraph::getCellPoly().

void UAvoidCell::init ( )
inline

Clear cell

Referenced by UAvoidCellGraph::getNewCell().

bool UAvoidCell::isBack ( int  nextID)
inline

Is this next ID a cell behind this cell - i.e. either cell[0] or cell[1]

bool UAvoidCell::isFwd ( int  nextID)
inline

Is this next ID a cell in front of this cell - i.e. either cell[2] or cell[3]

bool UAvoidCell::isInRightY ( double  y)
inline

is this y-value inside right side of cell

void UAvoidCell::link ( UAvoidCell arg1,
UAvoidCell arg2,
UAvoidCell arg3,
UAvoidCell arg4,
bool  openList 
)
inline

Link this cell to these 4 other cells.

Parameters
arg1is the previous (upper) left
arg2is the previous lower left
arg3is the next (upper) right cell,
arg4is the next lower right cell.

References cells.

Referenced by UAvoidCellGraph::makeCells().

void UAvoidCell::print ( FILE *  dest)
inline

Print cell content

References UAvoidVertexIdx::obst.

Referenced by UAvoidCellGraph::makeCells().

bool UAvoidCell::setCuts ( double  x,
ULogFile debugLog 
)
inline

Set intersection points for this open cell. Sets also the next cells further down the line.

Parameters
xis the x-intersection value.
vtis the related vertex

References ULogFile::getF(), UAvoidVertexIdx::obst, U2Dpos::set(), and U2Dpos::y.

Referenced by UAvoidCellGraph::makeCells().

void UAvoidCell::setXLeft ( double  x)
inline

set x value for start positions

void UAvoidCell::setXRight ( double  x)
inline

set x value for start positions

void UAvoidCell::unlinkOpen ( )
inline

Remove this open cell from open cell list

Referenced by UAvoidCellGraph::makeCells().

Member Data Documentation

UAvoidCell* UAvoidCell::cells[4]

add punishment to this cell

Parameters
valueis added to the cost of passing the cell Set const of this cell
valueset as the cost of the cell neighboring cells top-left, bot-left, top-right, bot-right top is higher y-value not valid are set to NULL

Referenced by UAvoidCellGraph::findCellPath(), UAvoidCellGraph::findCellPointPath(), link(), and UAvoidCellGraph::makeCells().

int UAvoidCell::id
UAvoidObst* UAvoidCell::obsts[2]

neighboring obstacles top (high y), bottom (low y) if free space then set to NULL

Referenced by UAvoidCellGraph::findCellPointPath(), and UAvoidCellGraph::makeCells().

U2Dpos UAvoidCell::oPoss[4]

position of corner - if free space set to +/- 1e6

Referenced by UAvoidCellGraph::findCellPath(), UAvoidCellGraph::findCellPointPath(), and UAvoidCellGraph::makeCells().


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