View Javadoc

1   
2   package nl.tudelft.goal.ut2004.visualizer.timeline.map;
3   
4   import java.awt.Color;
5   import java.util.List;
6   
7   import cz.cuni.amis.pogamut.unreal.bot.IUnrealBot;
8   
9   /**
10   * This interface is used for passing info about agent to {@link EntityRenderer}.
11   * 
12   * It is supposed to be unified interface for both timeline and overview map. 
13   * Timeline implementation will provide available info at current time of db.
14   *
15   * @param <T> Type of object this object uses to get its data from
16   * @author Honza
17   */
18  public interface IRenderableUTAgent extends IUnrealBot, IRenderableWorldObject {
19  
20      /**
21       * Get color of agent. It should not change if possible, otherwise it can confuse a user.
22       * @return Color that will be used to render agent in map.
23       */
24      public Color getColor();
25  
26  
27  
28      /**
29       * Return text info associated with the agent. Agent can have multiple infos
30       * associated (e.g. current state, like "I am in water" and "I am looking for ammo")
31       * @return List of infos about the agent.
32       */
33      public List<String> getAssociatedInfo();
34  
35      //TODO(MP): Not rendering map events.
36  	// /**
37  	// * Return list of all map events this agent has at the time.
38  	// * XXX: It is possible it would be better to provide List &lt;ISubGLRenderer&gt;s,
39  	// * but it would clash with model-view-control design pattern.
40  	// * @return List of map events belonging to this agent.
41  	// */
42  	// public List<MapEvent> getMapEvents();
43  
44      /**
45       * Return source of all data that are providing stuff used.
46       * Why do I want it? The selection, I am putting this stuff to lookup and
47       * some other component can look it up and select nodes representing data sources.
48       *
49       * XXX: return type should be more general, but this saves trouble and no need to
50       * generalize too soon.
51       */
52      public Object getDataSource();
53  
54  
55      /**
56       * Return OpenGl name used for selection (see selction mode of opengl).
57       * Basically after all is rendered, whe get glNames(ints) of objects that were
58       * rendered in viewvolume. But we need to map it back. That is what this is for.
59       * @return
60       */
61      public int getGLName();
62  }