Construct the Content Branch
Construct a content branch graph (or graphs), making:
-
a BranchGroup node
-
one or more TransformGroup, Shape3D, Light, Sound, etc. nodes in the branch
group
-
one or more Behavior nodes to modify content for animation and interaction
In this example there are two branch graphs and, thus,
two BranchGroup nodes. Attached to the left BranchGroup are two subgraphs. One
subgraph consists of a user-extended Behavior leaf node. The Behavior node contains
Java code for manipulating the transformation matrix associated with the object's
geometry.
The other subgraph in this BranchGroup consists of a TransformGroup node that
specifies the position (relative to the Locale), orientation, and scale of the
geometric objects in the virtual universe. A single child, a Shape3D leaf node,
refers to two component objects: a Geometry object and an Appearance object.
The Geometry object describes the geometric shape of a 3D object (a cube in
our simple example). The Appearance object describes the appearance of the geometry
(color, texture, material reflection characteristics, and so forth).