|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface for a strategy implementing a "pull" style of pick operation. The engine can be stateless since all picking data must be provided for each pick operation (the shape and control of the picker and pickable are outside the scope of this interface). A pick operation, unlike an intersection operation (see IntersectionEngine), produces a pick result containing information about each hit.
The pick engine is responsible for verifying picker and pickable types for compatibility, and for compiling the pick result according to the pick specifications. If multiple picker and pickable types are available pick specs can provide guidance as to which ones to use.
In a "pull" system, such as Java 3D, the client invokes pick operations on the graphic system, as opposed to a "push" system, such as Swing, where the client is notified by the graphic system that a target has been picked. Typically, one form can be readily translated into the other. TODO: Should a pick engine work only with SpaceNode pickers and pickables, with hits being Interactor? TODO: Should allowable hits also be provided to the pick engine?
Method Summary | |
PickResult |
doGraphicPick(java.util.Set specs,
java.util.Collection pickers,
java.util.Collection pickables)
Performs a pick operation on a group of pickable objects using a group of picker objects, and returns a pick result that conforms to the pick specs. |
Methods inherited from interface gumbo.graphic.Graphic |
getGraphic |
Method Detail |
public PickResult doGraphicPick(java.util.Set specs, java.util.Collection pickers, java.util.Collection pickables)
specs
- Flags (Picks.PICK_???, Picks.HIT_???) specifying the
pick operation and its result. Never null. PICK_??? flag
compliance is mandatory. HIT_??? flag compliance is typically
optional.pickers
- Group of pickers (Object). Never null.
If empty, no hits. A picker's reference space is assumed to be
absolute or natively defined unless it implements GraphicGeometry.pickables
- Group of pickables (Object). Never null.
If empty, no hits. A pickable's reference space is assumed to be
absolute or natively defined unless it implements GraphicGeometry.
java.lang.UnsupportedOperationException
- A picker's type is
incompatible.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |