Java Reference
In-Depth Information
Figure 27. WakeupOnSensorEntry and WakeupOnSensorExit
WakeupOnSensorEntry(Bounds region)
// Constructs a new WakeupOnEntry criterion for a sensor.
WakeupOnSensorExit(Bounds region)
// Constructs a new WakeupOnExit criterion for a sensor.
Bounds getBounds()
// Return the bound from a relevant object.
Similarly, when the platform enters the second set of bound, the user will see a message
“TIGERS ARE AN ENDANGERED SPECIES.” On exit, the message “ROAR!” will be
sensor entry and exIt events
Similar to detecting the entry and exit of the viewing platform into and out of certain spatial
regions, it is also possible to detect whether specific sensors have crossed certain boundaries
in entry or exit. The relevant constructors and methods are listed in Figure 27.
combInInG dIfferent Wakeup crIterIa
The detection of complicated behavior with excitations from various user and object inputs
may sometimes be better handled by combining several relevant wakeup criteria to form a
single WakeupCondition. This can be done by using the constructors of Figure 28, the first
Figure 28. Forming a single wakeup condition by logically combining wakeup criteria
WakeupOr(WakeupCriterion[] conditions)
WakeupAnd(WakeupCriterion[] conditions)
WakeupAndOfOrs(WakeupOr[] conditions)
WakeupOrsOfAnds(WakeupAnd[] conditions)
Search WWH ::

Custom Search