Areas
  • J3D FAQ
  • Tutorials
  • Utilities
  • Books
  • News
  • Other Sites
  •  Chapters
  • TOC
  • Geometry
  • Lighting
  • Textures
  • Behaviours
  • User Feedback
  • Navigation
  • Audio
  • Input Devices
  • No Monitors
  •  Sections
  • Chapter TOC
  • A Window to the World
  • Scene Graph Basics
  • Geometry
  • Textures
  • Cameras and Viewing
  •   

    Event Model

    © Justin Couch 1999

    So 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:

    1. Behaviours: An encapsulated piece of code that is triggered by the movement of the user or internal rendering system. The source is always the Java3D engine.
    2. Picking: The result of the user making suggestions about trying to find an object. Picking casts a line into the scene from a given point in a given direction and asks for intersecting objects. Principally used to deal with mouse input, but has other uses.
    3. Sensors: Used to harness external input devices and bring that information into the Java3D model in a device independent way. A sensor may be your mouse, a glove, a HMD tracking unit or motion capture suit. To Java3D, they all appear the same.
    Along with these basic devices, there are other environments that may be modelled too. For example, you may wish to include audio in your scene. There is a whole model used to determine how you hear the sound, depending on your position and other sound sources. Also, you may want to model The effects of your body in the scene - Avatar characteristics

    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

      

    [ TOC ] [ Home ] [ FAQ ] [ Books ] [ Tutorials ] [ Utilities ] [ Contact Us ]