public class MartinNavigator<PATH_ELEMENT extends ILocated> extends AbstractUDKPathNavigator<PATH_ELEMENT>
Modifier and Type | Class and Description |
---|---|
static class |
MartinNavigator.Stage
All stages the navigation can come to.
|
Modifier and Type | Field and Description |
---|---|
protected AdvancedLocomotion |
body
Agent's body.
|
static int |
CLOSE_ENOUGH
Distance, which is considered as close enough..
|
protected Logger |
log
Agent's log.
|
protected UDKBot |
main
Agent's main.
|
protected AgentInfo |
memory
Loque memory.
|
static int |
PRECISION |
bot, executor, self
Constructor and Description |
---|
MartinNavigator(UDKBot bot,
IUDKPathRunner runner,
Logger log)
Constructor.
|
MartinNavigator(UDKBot bot,
Logger log)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected NavPoint |
getNavPoint(ILocated location)
Returns
NavPoint instance for a given location. |
double |
getPrecision()
Returns maximum distance, that the bot will have from path target, if the navigator succeeds.
|
protected boolean |
initAlongPath(Location dest,
List<PATH_ELEMENT> path)
Initializes navigation along path.
|
protected MartinNavigator.Stage |
initDirectly(Location dest)
Initializes direct navigation to given destination.
|
protected void |
initDirectNavigation(Location dest)
Initializes direct navigation to the specified destination.
|
protected void |
initPathNavigation(Location destination,
List<PATH_ELEMENT> path)
Initializes navigation to the specified destination along specified path.
|
protected MartinNavigator.Stage |
keepNavigating()
Navigates with the current navigation request.
|
protected void |
navigate(int pathElementIndex)
Does the actual navigation of the bot, it should steer it towards path element of the index 'pathElementIndex'.
|
void |
newPath(List<PATH_ELEMENT> path)
UDKPathExecutor reports that new path has been received and the IUDKPathNavigator.navigate()
is about to be called in near future. |
void |
reset()
UDKPathExecutor reports that execution of current path has been terminated - clean up your internal data
structure and prepare to navigate the bot along the new path in the future. |
navigate, setBot, setExecutor
public static final int CLOSE_ENOUGH
public static final int PRECISION
protected UDKBot main
protected AgentInfo memory
protected AdvancedLocomotion body
protected Logger log
public MartinNavigator(UDKBot bot, Logger log)
main
- Agent's main.memory
- Loque memory.public MartinNavigator(UDKBot bot, IUDKPathRunner runner, Logger log)
main
- Agent's main.memory
- Loque memory.public double getPrecision()
IUDKPathNavigator
protected void navigate(int pathElementIndex)
AbstractUDKPathNavigator
AbstractUDKPathNavigator.navigate()
.navigate
in class AbstractUDKPathNavigator<PATH_ELEMENT extends ILocated>
public void reset()
IUDKPathNavigator
UDKPathExecutor
reports that execution of current path has been terminated - clean up your internal data
structure and prepare to navigate the bot along the new path in the future.public void newPath(List<PATH_ELEMENT> path)
IUDKPathNavigator
UDKPathExecutor
reports that new path has been received and the IUDKPathNavigator.navigate()
is about to be called in near future. The new path is passed as a parameter.protected void initPathNavigation(Location destination, List<PATH_ELEMENT> path)
destination
- Destination of the navigation.path
- Navigation path to the destination.protected boolean initAlongPath(Location dest, List<PATH_ELEMENT> path)
dest
- Destination of the navigation.path
- Path of the navigation.protected void initDirectNavigation(Location dest)
dest
- Destination of the navigation.timeout
- Maximum timeout of the navigation. Use 0 to auto-timeout.protected MartinNavigator.Stage initDirectly(Location dest)
dest
- Destination of the navigation.protected MartinNavigator.Stage keepNavigating()
protected NavPoint getNavPoint(ILocated location)
NavPoint
instance for a given location. If there is no navpoint in the vicinity of CLOSE_ENOUGH
null is returned.location
- Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.