1 package cz.cuni.amis.pogamut.base3d.worldview;
2
3 import java.util.Map;
4
5 import cz.cuni.amis.pogamut.base.communication.worldview.IWorldView;
6 import cz.cuni.amis.pogamut.base.communication.worldview.object.WorldObjectId;
7 import cz.cuni.amis.pogamut.base3d.worldview.object.IViewable;
8
9 public interface IVisionWorldView extends IWorldView {
10
11 /**
12 * Returns map of all visible objects ({@link IViewable} instances} - those that the agent can currently see.
13 * <p><p>
14 * <b>WARNING:</b> If you will do iteration over the map, you must synchronize on it.
15 */
16 @SuppressWarnings("unchecked")
17 public Map<Class, Map<WorldObjectId, IViewable>> getAllVisible();
18
19 /**
20 * Returns map of all visible objects ({@link IViewable} instances} - those that the agent can currently see.
21 * <p><p>
22 * <b>WARNING:</b> If you will do iteration over the map, you must synchronize on it.
23 *
24 * @param type
25 * @return
26 */
27 public <T extends IViewable> Map<WorldObjectId, T> getAllVisible(Class<T> type);
28
29 /**
30 * Returns map of all visible objects ({@link IViewable} instances} organized according to their {@link WorldObjectId} -
31 * those that the agent can currently see.
32 * <p><p>
33 * <b>WARNING:</b> If you will do iteration over the map, you must synchronize on it.
34 * @return
35 */
36 public Map<WorldObjectId, IViewable> getVisible();
37
38 /**
39 * Returns a visible world object of the specific id (if exists inside the world view and is visible).<p>
40 * Otherwise, null is returned.
41 *
42 * @param id objects's id
43 * @return
44 */
45 public IViewable getVisible(WorldObjectId id);
46
47 }