1 package cz.cuni.amis.pogamut.ut2004.agent.navigation;
2
3 import cz.cuni.amis.pogamut.base.agent.navigation.IPathFuture;
4 import cz.cuni.amis.pogamut.base.agent.navigation.IPathPlanner;
5 import cz.cuni.amis.pogamut.base3d.worldview.object.ILocated;
6 import cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot;
7 import cz.cuni.amis.utils.exception.PogamutException;
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 public class UT2004AStarPathPlanner implements IPathPlanner<ILocated> {
23
24 private UT2004Bot bot;
25
26 public UT2004AStarPathPlanner(UT2004Bot bot) {
27 this.bot = bot;
28 }
29
30 @Override
31 public IPathFuture<ILocated> computePath(ILocated from, ILocated to) {
32 return new UT2004AStarPathFuture(bot, from, to);
33 }
34
35 public double getDistance(ILocated from, ILocated to) {
36 throw new PogamutException("Could not compute path-distances on the fly!", this);
37 }
38
39 }