|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT> cz.cuni.amis.pogamut.base.agent.module.SensorModule<UT2004Bot> cz.cuni.amis.pogamut.ut2004.agent.module.sensor.NavigationGraphHelper
public class NavigationGraphHelper
This module helps you to obtain nearest NavPoint
and NavPointNeighbourLink
to your current location.
Nested Class Summary | |
---|---|
protected class |
NavigationGraphHelper.MapPointListObtainedListener
MapPointListObtained listener. |
Field Summary | |
---|---|
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. |
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.SensorModule |
---|
worldView |
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
---|
agent, controller, eventBus, log |
Constructor Summary | |
---|---|
NavigationGraphHelper(UT2004Bot bot)
|
Method Summary | |
---|---|
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'. |
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
---|
cleanUp, getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, start, stop, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public NavigationGraphHelper(UT2004Bot bot)
Method Detail |
---|
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
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |