|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004RunStraight
public class UT2004RunStraight
Run straight class is meant to provide "straight running" combined with "stuck detection".
Automatically uses UT2004TimeStuckDetector
, UT2004PositionStuckDetector
and UT2004DistanceStuckDetector
.
Field Summary | |
---|---|
static double |
AT_NAVPOINT
|
static double |
AT_PLAYER
|
protected UT2004Bot |
bot
|
static int |
CLOSE_ENOUGH
|
protected ILocated |
currentTarget
|
protected IWorldEventListener<EndMessage> |
endListener
|
protected boolean |
executing
|
protected boolean |
failed
|
protected ILocated |
focus
|
protected AgentInfo |
info
|
protected Location |
initialLocation
|
protected ILocated |
lastTarget
|
protected LogCategory |
log
|
static double |
MAX_ANGLE
|
protected IUT2004PathRunner |
runner
|
protected List<IStuckDetector> |
stuckDetectors
|
protected boolean |
success
|
Constructor Summary | |
---|---|
UT2004RunStraight(UT2004Bot bot,
AgentInfo info,
AdvancedLocomotion move)
|
Method Summary | |
---|---|
void |
addStuckDetector(IStuckDetector stuckDetector)
Adds another stuck detector to be used for stuck detection :) |
void |
clearStuckDetectors()
Removes ALL stuck detectors. |
ILocated |
getCurrentTarget()
Get current target of the straight-run. |
ILocated |
getLastTarget()
Get previous target of the straight-run. |
Logger |
getLog()
Returns component's logger. |
boolean |
isExecuting()
Whether the object is executing the running. |
boolean |
isFailed()
Whether our run has failed. |
boolean |
isSuccess()
Whether our run has succeeded (once we get to our target, this returns true). |
void |
removeStuckDetector(IStuckDetector stuckDetector)
Removes stuck detector. |
protected void |
reset()
|
protected void |
runStraight()
|
void |
runStraight(ILocated target)
Run along straight-line to some target. |
void |
setFocus(ILocated focus)
Sets focus of the bot when navigating (when using this object to run to some location target)! To reset focus call this method with null parameter. |
void |
stop(boolean stopMovement)
Stop the running. |
protected void |
stuck()
|
protected void |
success()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CLOSE_ENOUGH
public static final double AT_PLAYER
public static final double AT_NAVPOINT
public static final double MAX_ANGLE
protected UT2004Bot bot
protected AgentInfo info
protected IUT2004PathRunner runner
protected boolean executing
protected LogCategory log
protected IWorldEventListener<EndMessage> endListener
protected List<IStuckDetector> stuckDetectors
protected Location initialLocation
protected ILocated currentTarget
protected boolean success
protected boolean failed
protected ILocated lastTarget
protected ILocated focus
Constructor Detail |
---|
public UT2004RunStraight(UT2004Bot bot, AgentInfo info, AdvancedLocomotion move)
Method Detail |
---|
public Logger getLog()
IUT2004RunStraight
getLog
in interface IUT2004RunStraight
public void addStuckDetector(IStuckDetector stuckDetector)
IUT2004RunStraight
addStuckDetector
in interface IUT2004RunStraight
public void removeStuckDetector(IStuckDetector stuckDetector)
IUT2004RunStraight
removeStuckDetector
in interface IUT2004RunStraight
public void clearStuckDetectors()
IUT2004RunStraight
clearStuckDetectors
in interface IUT2004RunStraight
public boolean isExecuting()
IUT2004RunStraight
isExecuting
in interface IUT2004RunStraight
public boolean isSuccess()
IUT2004RunStraight
isSuccess
in interface IUT2004RunStraight
public boolean isFailed()
IUT2004RunStraight
isFailed
in interface IUT2004RunStraight
public ILocated getLastTarget()
IUT2004RunStraight
getLastTarget
in interface IUT2004RunStraight
public ILocated getCurrentTarget()
IUT2004RunStraight
getCurrentTarget
in interface IUT2004RunStraight
public void setFocus(ILocated focus)
IUT2004RunStraight
setFocus
in interface IUT2004RunStraight
public void runStraight(ILocated target)
IUT2004RunStraight
runStraight
in interface IUT2004RunStraight
public void stop(boolean stopMovement)
IUT2004RunStraight
stop
in interface IUT2004RunStraight
protected void reset()
protected void runStraight()
protected void success()
protected void stuck()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |