gumbo.interact
Class PickAdapter

java.lang.Object
  |
  +--gumbo.interact.PickAdapter

public class PickAdapter
extends java.lang.Object

An adapter that converts a PickResult into an Interactor pick. The default implementation outputs the hit object in the first hit in the pick result as the picked interactor, NO_PICK_TARGET if no hits, or null if picking is inactive or the pick should be ignored.

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

Constructor Summary
PickAdapter()
          Creates an instance, with onChange true.
PickAdapter(boolean onChange)
          Creates an instance.
 
Method Summary
 BooleanField.EventOut getActiveOut()
          Sends true after a new non-null source object, and false before it changes or goes null.
 InteractorField.EventOut getPickOut()
          Sends the pick interactor corresponding to result in, unless onChange is true and pick out has not changed.
 PickResultField.EventIn getResultIn()
          The input pick result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PickAdapter

public PickAdapter()
Creates an instance, with onChange true.


PickAdapter

public PickAdapter(boolean onChange)
Creates an instance. Master constructor.

Parameters:
onChange - If true, an output event is sent only if its data value changes.
Method Detail

getResultIn

public PickResultField.EventIn getResultIn()
The input pick result. If the pick is valid, contains none or more hits; otherwise, null, which occurs if the pick operation is benignly invalid (picking is inactive) or should be ignored (consumed by the native graphic system).


getPickOut

public InteractorField.EventOut getPickOut()
Sends the pick interactor corresponding to result in, unless onChange is true and pick out has not changed. NO_PICK_TARGET if no hit or hit is not an Interactor. Null if result in is null, or the pick occured while active in is false.


getActiveOut

public BooleanField.EventOut getActiveOut()
Sends true after a new non-null source object, and false before it changes or goes null. TODO: For consistency, redefine active out to go true before all other outputs.