Java Reference
In-Depth Information
Figure 2. Rotating color cube from the program of Figure 1
scene Graph basIcs
Under Java 3D, a 3D virtual world or scene is described in terms of a variety of objects
arranged in a tree like graph called the scene graph. Some of the objects may give the ge-
ometry of visual objects in the virtual world, some on how the visual objects will behave
when the user picks them up, some on the sounds that will be produced, and so on.
A Java 3D program builds the 3D world by creating these objects through instantiating
the appropriate classes, setting their attributes, and linking them appropriately to form the
scene graph. In subsequent chapters, we will describe and give examples on how differ-
ent types of objects, including those on geometry, appearance, behaviors, sound, lights,
transforms, viewpoint, location, and orientation, can be created and used.
Once the scene graph has been created, the description of the virtual universe is es-
sentially complete. The rendering of the virtual universe into the physical world, which
may consist of a simple monitor, multiple screen systems, head mounted or other displays,
will be carried out by Java 3D.
For the purposes of illustration, Figure 2-3 shows a simple tree structure, with five
nodes. Node A is the root, nodes B and C are its children, while nodes D and E have no
Search WWH ::

Custom Search