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

#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

UAvoidObstaobOther
 
UPosition aobPos
 
UAvoidObstaobThis
 

Detailed Description

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.

Constructor & Destructor Documentation

UAvoidNoVis::UAvoidNoVis ( )
inline

Constructor

References clear().

Member Function Documentation

void UAvoidNoVis::clear ( void  )
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.

Parameters
idxif 0, then from 1cm from vertex on other obst to COG of this
idxif 1, then from 1cm from vertex /towards this obst) to COG of other obstacle.
Returns
the specified line segment

Copyright (C) 2010 by DTU (Christian Andersen) jca@o.nosp@m.erst.nosp@m.ed.dt.nosp@m.u.dk

  • This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. *
  • This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. *
  • You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

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.

Returns
the found line segment.

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 
)

Member Data Documentation

UAvoidObst* UAvoidNoVis::aobOther
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().


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