Manages the global "selection" in Wonderland. The Selection Manager handles all sorts of interactions with Entities in the world. The selection manager sits above the basic input mechanism and adds interpretation in terms of "actions" in the Wonderland context.
- Selection: The selection of an Entity in the world. This includes selecting one or more Entities in the world. A selected Entity(s) will be indicated in some way. This also involves deselecting (clearing) any of the Entities.
- Context: A Context action is one that depends upon the set of Entities that are selected. Typically a menu pops up with further actions possible.
- Enter/Exit: An Enter/Exit action is where the pointer enters or exits an Entity, typically with the mouse pointer.
- Hover: A Hover action is where the pointer hovers over an Entity (typically by hovering the mouse). This includes the "start" hovering and the "stop" hovering.
- Activation: The activation of an Entity in the world. For example, when a user double-clicks on an Entity, it is activated.
Threads can register listeners on the scene manager for these actions. There are methods to fetch the collection of selected entities and the Entity where there is a hover. Threads can also manually clear the selected Entities.
The Selection Manager acts on individual Entities, so multiple Entities with a Cell can be individually selected. Threads can fetch the Cell object associated with an Entity via the getCellForEntity() method.
Which mouse and keyboard events correspond to the Selection Manager actions are controlled via a "selection policy" as defined by a class that implements the SceneManagerPolicy interface.
@author Jordan Slott