1 package cz.cuni.amis.pogamut.ut2004.agent.navigation; 2 3 import java.util.logging.Level; 4 5 import cz.cuni.amis.pogamut.base.agent.navigation.IStuckDetector; 6 import cz.cuni.amis.pogamut.base3d.worldview.object.ILocated; 7 import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint; 8 9 /** 10 * This class is meant to provide easy "get-back-to-navigation-graph-in-order-I-can-safely-navigate-through-map" 11 * implementation. 12 * 13 * @author Jimmy 14 */ 15 public interface IUT2004GetBackToNavGraph { 16 17 /** 18 * Returns nearest {@link NavPoint} to current bot's location. 19 * 20 * @return 21 */ 22 public NavPoint getNearestNavPoint(); 23 24 /** 25 * Whether the bot is currently on some {@link NavPoint}. 26 */ 27 public boolean isOnNavGraph(); 28 29 /** 30 * Whether the class is executing (== working == trying to get the bot back on NavGraph == to make {@link UT2004GetBackToNavGraph#isOnNavGraph()} true). 31 * @return 32 */ 33 public boolean isExecuting(); 34 35 /** 36 * Sets focus of the bot when navigating (when using this object to run to some location target)! 37 * To reset focus call this method with null parameter. 38 * 39 * @param located 40 */ 41 public void setFocus(ILocated located); 42 43 /** 44 * Start the class, let it take the bot back to navigation graph. 45 */ 46 public void backToNavGraph(); 47 /** 48 * Stop the class. 49 */ 50 public void stop(); 51 52 /** 53 * Adds another stuck detector to be used for stuck detection :) 54 * @param stuckDetector 55 */ 56 public void addStuckDetector(IStuckDetector stuckDetector); 57 58 /** 59 * Removes stuck detector. 60 * @param stuckDetector 61 */ 62 public void removeStuckDetector(IStuckDetector stuckDetector); 63 64 /** 65 * Removes ALL stuck detectors. 66 */ 67 public void clearStuckDetectors(); 68 69 }