386

Creating behaviors
Creating behaviors

  • A behavior can do anything
  • Perform computations
  • Update its internal state
  • Modify the scene graph
  • Start a thread
  • For example, a behavior to rotate a radar dish to track an object:
  • On initialization, set initial wakeup criteria
  • Get the object's location
  • Create a transform to re-orient the radar dish
  • Set a TransformGroup of the radar dish
  • Set the next wakeup criteria
  • Return