public class NavigationGraphHelper extends SensorModule<UT2004Bot>
NavPoint
and NavPointNeighbourLink
to your current location.Modifier and Type | Class and Description |
---|---|
protected class |
NavigationGraphHelper.MapPointListObtainedListener
MapPointListObtained listener. |
Modifier and Type | Field and Description |
---|---|
protected NavigationGraphHelper.MapPointListObtainedListener |
mapPointListObtainedListener |
static DistanceUtils.IGetDistance<NavPointNeighbourLink> |
NAV_LINK_GET_DISTANCE |
static DistanceUtils.IGetDistance<NavLinkPair> |
NAV_LINK_PAIR_GET_DISTANCE |
protected Set<NavLinkPair> |
navLinkPairs
List of ALL existing
NavLinkPair in the map. |
protected Map<UnrealId,Set<NavLinkPair>> |
navPointLinks
Key:
NavPoint.getId()
Value: set of link (pairs) that either originate or ends in the corresponding navpoint, i.e. |
worldView
agent, controller, eventBus, log
Constructor and Description |
---|
NavigationGraphHelper(UT2004Bot bot) |
Modifier and Type | Method and Description |
---|---|
NavLinkPair |
getNearestNavLinkPair()
Returns nearest
NavLinkPair to current bot position. |
NavLinkPair |
getNearestNavLinkPair(ILocated target)
Returns nearest
NavLinkPair to some 'target'. |
NavPoint |
getNearestNavPoint()
Returns nearest
NavPoint to current bot position. |
NavPoint |
getNearestNavPoint(double maxDistance)
Returns nearest
NavPoint to current bot position no further than 'maxDistance' from the bot. |
NavPoint |
getNearestNavPoint(ILocated target)
Returns nearest
NavPoint to some 'target'. |
NavPoint |
getNearestNavPoint(ILocated target,
double maxDistance)
Returns nearest
NavPoint to some 'target' no further than 'maxDistance' from the bot. |
protected void |
init(Collection<NavPoint> navPoints)
Initialization method called from
NavigationGraphHelper.MapPointListObtainedListener . |
static Boolean |
isPointProjectionAfterLinkSegment(NavPointNeighbourLink link,
ILocated point)
Tells whether "point" projection to "link" is inside the "link segment".
|
static Boolean |
isPointProjectionBeforeLinkSegment(NavPointNeighbourLink link,
ILocated point)
Tells whether "point" projection to "link" is inside the "link segment".
|
static Boolean |
isPointProjectionOnLinkSegment(NavPointNeighbourLink link,
ILocated point)
Tells whether "point" projection to "link" is inside the "link segment".
|
static Location |
projectPointToLinkLine(NavPointNeighbourLink link,
ILocated point)
Projects 'point' to line formed by the 'link'.
|
cleanUp, getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, start, stop, toString
public static final DistanceUtils.IGetDistance<NavPointNeighbourLink> NAV_LINK_GET_DISTANCE
public static final DistanceUtils.IGetDistance<NavLinkPair> NAV_LINK_PAIR_GET_DISTANCE
protected Map<UnrealId,Set<NavLinkPair>> navPointLinks
NavPoint.getId()
Value: set of link (pairs) that either originate or ends in the corresponding navpoint, i.e. NavLinkPair.isLinkNavPoint(UnrealId)
is true for the key.protected Set<NavLinkPair> navLinkPairs
NavLinkPair
in the map.protected NavigationGraphHelper.MapPointListObtainedListener mapPointListObtainedListener
public NavigationGraphHelper(UT2004Bot bot)
public NavPoint getNearestNavPoint()
NavPoint
to current bot position.public NavPoint getNearestNavPoint(double maxDistance)
NavPoint
to current bot position no further than 'maxDistance' from the bot.public NavLinkPair getNearestNavLinkPair()
NavLinkPair
to current bot position.public NavPoint getNearestNavPoint(ILocated target)
NavPoint
to some 'target'.target
- public NavPoint getNearestNavPoint(ILocated target, double maxDistance)
NavPoint
to some 'target' no further than 'maxDistance' from the bot.target
- maxDistance
- public NavLinkPair getNearestNavLinkPair(ILocated target)
NavLinkPair
to some 'target'.target
- public static Location projectPointToLinkLine(NavPointNeighbourLink link, ILocated point)
link
- point
- public static Boolean isPointProjectionOnLinkSegment(NavPointNeighbourLink link, ILocated point)
link
- point
- public static Boolean isPointProjectionBeforeLinkSegment(NavPointNeighbourLink link, ILocated point)
link
- point
- public static Boolean isPointProjectionAfterLinkSegment(NavPointNeighbourLink link, ILocated point)
link
- point
- protected void init(Collection<NavPoint> navPoints)
NavigationGraphHelper.MapPointListObtainedListener
.Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.