gumbo.graphic.probe
Class Picks

java.lang.Object
  |
  +--gumbo.graphic.probe.Picks

public class Picks
extends java.lang.Object

Constants and utilities related to picking.

Pick specification flags are divided into "pick" flags and "hit" flags. These flags are used to specify a pick operation, to describe the contents of a pick operation result, and to define the capabilities of a pick element. Pick flags and masks pertain to the quantity, grouping, and ordering of the hits in a pick result. Hit flags and values pertain to the information in individual hit results. Clients, picker, and pickable objects may define additional "custom" pick and hit flags.

TODO: Is this true? All pick and hit geometry is defined relative to the root graphic space (world, view, display), not the picker or hit object local space.

Version:
$Revision: 1.2 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.

Field Summary
static PickResult EMPTY_PICK_RESULT
          An empty pick result, with no specs or hits.
static StateFlag HIT_DEGREE_HIT
          Hit flag: If set, the amount of hit shape hit by the pick shape will be determined.
static StateFlag HIT_DEGREE_PICK
          Hit flag: If set, the amount of pick shape hitting the hit shape will be determined.
static StateFlag HIT_DETAIL
          Hit flag: If set, some detailed information about the hit will be determined, such as the element (vertex, edge, facet) in the object that was hit.
static StateFlag HIT_DIRECTION
          Hit flag: If set, the direction of the hit from the picker position will be determined.
static StateFlag HIT_DISTANCE
          Hit flag: If set, the distance of the hit (point) from the picker position will be determined.
static java.util.Set HIT_MASK
          Hit value: All the hit flags.
static StateFlag HIT_NORMAL
          Hit flag: If set, the surface normal on the object where the hit occured.
static StateFlag HIT_POINT
          Hit flag: If set, the point on the object where the hit occured.
static StateFlag HIT_POSITION
          Hit flag: If set, the position of the hit object.
static StateFlag HIT_ROTATION
          Hit flag: If set, the rotation of the hit object.
static java.util.Set PICK_ALL_HITS_MASK
          Pick value: Picks all hits on all pickables with all pickers, ordered closest to fathest.
static java.util.Set PICK_ALL_PICKABLES_MASK
          Pick value: Picks the closest hit on all pickables with all pickers, ordered closest to farthest.
static java.util.Set PICK_ANY_HIT_MASK
          Pick value: Picks any one hit, on any one pickable, using any one picker.
static java.util.Set PICK_CLOSEST_HIT_MASK
          Pick value: Picks the one closest hit on all pickables with all pickers.
static StateFlag PICK_GROUPED
          Pick flag: If set, the hits in the result are grouped by pickable, in no particular order; otherwise, the hits will not be grouped.
static java.util.Set PICK_MASK
          Pick value: All the pick flags.
static StateFlag PICK_ONE_HIT
          Pick flag: If set, one hit per pickable will be included in the result; otherwise, all the hits on a pickable are included.
static StateFlag PICK_ONE_PICKABLE
          Pick flag: If set, one hit pickable will be included in the result; otherwise, all the hit pickables are included.
static StateFlag PICK_ONE_PICKER
          Pick flag: If set, one picker's hits per pickable will be included in the result; otherwise, all the picker hits are included.
static StateFlag PICK_ORDERED
          Pick flag: If set, the hits in the result are ordered by hit, closest to farthest; otherwise, the hit order may be arbitrary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_PICK_RESULT

public static final PickResult EMPTY_PICK_RESULT
An empty pick result, with no specs or hits. Used as a null object for "no pick".


PICK_ONE_PICKER

public static final StateFlag PICK_ONE_PICKER
Pick flag: If set, one picker's hits per pickable will be included in the result; otherwise, all the picker hits are included. If PICK_ORDERED is also set, the one picker's hits will include the closest one.


PICK_ONE_PICKABLE

public static final StateFlag PICK_ONE_PICKABLE
Pick flag: If set, one hit pickable will be included in the result; otherwise, all the hit pickables are included. If PICK_ORDERED is also set, the hits on the one pickable will include the closest one.


PICK_ONE_HIT

public static final StateFlag PICK_ONE_HIT
Pick flag: If set, one hit per pickable will be included in the result; otherwise, all the hits on a pickable are included. If PICK_ORDERED is also set, the hit on the pickable will also be the closest one.


PICK_GROUPED

public static final StateFlag PICK_GROUPED
Pick flag: If set, the hits in the result are grouped by pickable, in no particular order; otherwise, the hits will not be grouped.


PICK_ORDERED

public static final StateFlag PICK_ORDERED
Pick flag: If set, the hits in the result are ordered by hit, closest to farthest; otherwise, the hit order may be arbitrary. If PICK_GROUPED is also set, the hits are grouped and ordered by closest pickable hit, with the hits within a group ordered closest to farthest.


PICK_ANY_HIT_MASK

public static final java.util.Set PICK_ANY_HIT_MASK
Pick value: Picks any one hit, on any one pickable, using any one picker.


PICK_CLOSEST_HIT_MASK

public static final java.util.Set PICK_CLOSEST_HIT_MASK
Pick value: Picks the one closest hit on all pickables with all pickers.


PICK_ALL_PICKABLES_MASK

public static final java.util.Set PICK_ALL_PICKABLES_MASK
Pick value: Picks the closest hit on all pickables with all pickers, ordered closest to farthest.


PICK_ALL_HITS_MASK

public static final java.util.Set PICK_ALL_HITS_MASK
Pick value: Picks all hits on all pickables with all pickers, ordered closest to fathest.


PICK_MASK

public static final java.util.Set PICK_MASK
Pick value: All the pick flags.


HIT_DEGREE_PICK

public static final StateFlag HIT_DEGREE_PICK
Hit flag: If set, the amount of pick shape hitting the hit shape will be determined.


HIT_DEGREE_HIT

public static final StateFlag HIT_DEGREE_HIT
Hit flag: If set, the amount of hit shape hit by the pick shape will be determined.


HIT_POSITION

public static final StateFlag HIT_POSITION
Hit flag: If set, the position of the hit object.


HIT_ROTATION

public static final StateFlag HIT_ROTATION
Hit flag: If set, the rotation of the hit object.


HIT_POINT

public static final StateFlag HIT_POINT
Hit flag: If set, the point on the object where the hit occured. If the pick shape has volume, then it should be the closest point.


HIT_NORMAL

public static final StateFlag HIT_NORMAL
Hit flag: If set, the surface normal on the object where the hit occured. If HIT_POINT is set, then the normal must be at the point.


HIT_DISTANCE

public static final StateFlag HIT_DISTANCE
Hit flag: If set, the distance of the hit (point) from the picker position will be determined. If HIT_POINT is set, then the distance must be to the point.


HIT_DIRECTION

public static final StateFlag HIT_DIRECTION
Hit flag: If set, the direction of the hit from the picker position will be determined. If HIT_POINT is set, then the direction must be to the point.


HIT_DETAIL

public static final StateFlag HIT_DETAIL
Hit flag: If set, some detailed information about the hit will be determined, such as the element (vertex, edge, facet) in the object that was hit. Requires cooperation between the hit shapes and the client.


HIT_MASK

public static final java.util.Set HIT_MASK
Hit value: All the hit flags.