< Zurück | Inhalt | Weiter >

4.7.2 Mixed mode

Rendering in mixed mode consists of nothing more than taking the ImmediateTest example and fleshing out the scenegraph to include geometry information. The MixedTest example adds the following Nodes to the scenegraph:

Background node: Colors the background of the Canvas3D.

TransformGroup: Scales the View side of the scenegraph (located above the ViewPlatform).

RotationInterpolator: Rotates the Transform3D instance inside the TransformGroup.

ColorCube: Adds Cube geometry as a child of the rotating TransformGroup above.

Figure 4.19 shows a sample frame rendered by the MixedTest example.


Figure 4.19 Output from the MixedTest.java example. The grid of points (a PointArray) has been rendered into the Canvas3D in immediate mode while the ColorCube in the center was added to the scenegraph and rendered in retained mode. Also note that a background Node was used to color the background of the Canvas3D, also rendered in retained mode


From MixedTest.java