PATH_ELEMENT - public interface IUDKPathNavigator<PATH_ELEMENT extends ILocated>
IPathExecutor
and UDKPathExecutor documentation, do it now. If you did, read on.
The IUDKPathNavigator navigator is the easiest-to-implement piece of UDKPathExecutor in
terms that it has only two methods to implement. On the other hand - it is actually very hard to navigate the bot
through UDK environment. But! If you need to actually change the way how bot is running inside the UDK,
implementing own IUDKPathNavigator is the best thing to do (you should probably start
by copy-pasting the code from UDKPathExecutorNavigator into your new class and experiment with it a bit).
This navigator interface is actually used by UDKPathExecutor that covers the tricky part when and how
to call its methods navigate() and reset().
| Modifier and Type | Method and Description |
|---|---|
double |
getPrecision()
Returns maximum distance, that the bot will have from path target, if the navigator succeeds.
|
void |
navigate()
This method is regularly called by
UDKPathExecutor to continue the navigation of the bot
inside the UDK. |
void |
newPath(List<PATH_ELEMENT> path)
UDKPathExecutor reports that new path has been received and the 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. |
void |
setBot(UDKBot bot)
Sets the
UDKBot instance that the navigator should navigate. |
void |
setExecutor(IPathExecutorHelper<PATH_ELEMENT> owner)
Sets the
IPathExecutorHelper who is using the navigator, i.e., are calling its
IUDKPathNavigator#navigate(Self) and reset()
methods. |
void setBot(UDKBot bot)
UDKBot instance that the navigator should navigate. Use its AbstractEmbodiedAgent.getAct()
to pass commands to the bot.bot - void setExecutor(IPathExecutorHelper<PATH_ELEMENT> owner)
IPathExecutorHelper who is using the navigator, i.e., are calling its
IUDKPathNavigator#navigate(Self) and reset()
methods.
Used by IPathExecutorHelper implementation to inject its instance into the navigator,
so the navigator may call methods such as IPathExecutorHelper.checkStuckDetectors(),
IPathExecutorHelper.switchToAnotherPathElement(int), IPathExecutorHelper.stuck()
and IPathExecutorHelper.targetReached().
owner - void navigate()
UDKPathExecutor to continue the navigation of the bot
inside the UDK.bot - instance of the bot we're navigatingself - Self object of the bot the navigator should movevoid 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.void newPath(List<PATH_ELEMENT> path)
UDKPathExecutor reports that new path has been received and the navigate()
is about to be called in near future. The new path is passed as a parameter.path - double getPrecision()
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.