AURobotServers
4
|
#include <uavoidnovis.h>
Public Member Functions | |
void | clear () |
bool | crossingNoVisLine (bool isCV, UPosition p1) |
ULineSegment | getNoVisSegment (int idx) |
ULineSegment | getNoVisSegment () |
void | setNoVisSegment (int firstNear, int lastNear, UAvoidObst *thisObst, UAvoidObst *otherObst) |
void | setNoVisSegment (UPosition posX, UAvoidObst *thisObst, UAvoidObst *otherObst) |
UAvoidNoVis () | |
Public Attributes | |
UAvoidObst * | aobOther |
UPosition | aobPos |
UAvoidObst * | aobThis |
Class with line segments that connects obstacles in a group, to avoid visibility between obstacles that are too close to pass between. These lines atre used in the visibility test for tangent lines.
|
inline |
Constructor
References clear().
|
inline |
Clear the no-visibility data set
References aobOther, aobThis, crossingNoVisLine(), getNoVisSegment(), and setNoVisSegment().
Referenced by UAvoidObst::addToGroupIfWithinMargin2(), and UAvoidNoVis().
bool UAvoidNoVis::crossingNoVisLine | ( | bool | isCV, |
UPosition | p1 | ||
) |
A tangent entering the obstacle from position 'p1' following the obstacle edges CV (or CCV) as indicated by 'isCV'. Is the path thorugh the (first) vertex crossing the no-visibility lines? Returns true if the line is crossed.
Referenced by clear().
ULineSegment UAvoidNoVis::getNoVisSegment | ( | int | idx | ) |
Get no-visibility line segment.
idx | if 0, then from 1cm from vertex on other obst to COG of this |
idx | if 1, then from 1cm from vertex /towards this obst) to COG of other obstacle. |
Copyright (C) 2010 by DTU (Christian Andersen) jca@o erst ed.dt u.dk
References aobOther, aobPos, aobThis, UPolygon::getCogXY(), UAvoidObst::obst, ULineSegment::setFromPoints(), and UPosition::z.
Referenced by UAvoidPath2::addNoVisLinesAsObstacles(), UAvoidObst::crossingNonVisibilityLine(), UAvoidPath2::logObstacleGroups(), and UFunctionAvoid::sendCurrentAvoidPath().
ULineSegment UAvoidNoVis::getNoVisSegment | ( | ) |
Get no-visibility line segment. From near vertex of other obstaclel (inside or on edge) to COG of this obsatcle.
References aobOther, aobPos, aobThis, UPolygon::getClosestDistance(), UPolygon::getCogXY(), UPolygon::getPointsCnt(), ULine::getPositionOnLine(), UAvoidObst::obst, ULineSegment::setFromPoints(), UPosition::x, UPosition::y, and UPosition::z.
Referenced by clear().
void UAvoidNoVis::setNoVisSegment | ( | int | firstNear, |
int | lastNear, | ||
UAvoidObst * | thisObst, | ||
UAvoidObst * | otherObst | ||
) |
Get number of non-visibility segment count. Add a set of vertices that is too close to another obstacle.
References a, aobOther, aobPos, aobThis, UPolygon::getDistance(), UPolygon::getPoint(), UPolygon::getPointsCnt(), UAvoidObst::nogoEdge, UAvoidObst::obst, UPosition::x, and UPosition::y.
Referenced by UAvoidObst::addToGroupIfWithinMargin2(), and clear().
void UAvoidNoVis::setNoVisSegment | ( | UPosition | posX, |
UAvoidObst * | thisObst, | ||
UAvoidObst * | otherObst | ||
) |
References aobOther, aobPos, aobThis, UPolygon::getCogXY(), ULine::getPositionOnLine(), UAvoidObst::obst, and ULineSegment::setFromPoints().
UAvoidObst* UAvoidNoVis::aobOther |
The no-visibility is due to nearness to this other obstacle
Referenced by UAvoidPath2::addNoVisLinesAsObstacles(), clear(), getNoVisSegment(), UAvoidPath2::logObstacleGroups(), UAvoidObst::passingNoGoEdge2(), and setNoVisSegment().
UPosition UAvoidNoVis::aobPos |
Number of points allowed in the near array. Vertex span too close to another obstacle to allow passage. First is the lowest index number and last the highest. If first is larger than last, then the index rolls over. if first and last is the same, then there is only one-
Referenced by getNoVisSegment(), and setNoVisSegment().
UAvoidObst* UAvoidNoVis::aobThis |
This obstacle is the one where the index numbers relate to.
Referenced by UAvoidPath2::addNoVisLinesAsObstacles(), clear(), getNoVisSegment(), and setNoVisSegment().