Games Programming with Java and Java 3D
colour, texture, and transparency.
Environment nodes handle
environmental concerns inside the Figure 3. Scene Graph Symbols.
virtual world, such as lighting,
sound, and behaviours that change the world.
Group nodes are containers for other groups or for leaf nodes. Leaf nodes are usually
shape or environmental nodes. The Group class supports node positioning and
orientation for its children, and is subclassed in various ways. For instance,
BranchGroup allows children to be added or removed at run time, while
TransformGroup permits the position and orientation of its children to be changed.
12
Games Programming with Java and Java 3D
4.2. HelloUniverse
The standard first example for Java 3D programmers is HelloUniverse (it appears in
chapter 1 of the Java 3D tutorial). The program displays a rotating coloured cube, as
in Figure 4.
Figure 4