![]() | ![]() | ![]() |
|
Event Model© Justin Couch 1999So far, all you've been introduced to is static geometry. Once you place an object into the scene graph, it stays there, fixed in space. For all but the most trivial applications, this is insufficient. We want animation and to be able to move around the world viewing it from different perspectives. Somehow we need generate information that causes the scene graph to dynamically change. This is called the event model. An event model describes how information flows around the scene graph from either external sources, like your mouse, or internal sources, like a timer or proximity sensor. It involves the propogation of data through a series of nodes until it reaches a sink that consume it and makes the final change on your scene graph. Events apply to many different things: it may be you walking into an object, the audio fading as you walk away from the object, or clicking on an object. In Java 3D, events can be classified into one of three basic areas:
Each of these event models have different characteristics. They don't all follow the event listener pattern that you are familiar with from AWT or JavaBeans. For the moment, we won't go into the description of the different event models, as they will be covered extensively in the Chapter 5 Behaviours |
|