Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization
by Alejandro Terrazas, John Ostuni, Michael Barlow
The Behavior Class
The Behavior class is an abstract class in which code for manipulating the scene graph is typically placed. We say typically because you will see that a Behavior can perform important functions not related to the manipulation of the scene graph. Nevertheless, Behavior objects are the primary way in which user input can communicate with the virtual universe. Recall that an abstract class is never instantiated directly but rather is subclassed (extended) to accomplish some particular goal.
Similar to an event listener, the general idea of a Behavior object is to specify what to do and when to do it. As you will soon see, these two functions are handled in the processStimulus() and initialization() methods, respectively. A big ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access