Treffer: Get a Life (in 3D).
Weitere Informationen
This chapter introduces a number of programming techniques that you will see again frequently in upcoming chapters. We will integrate Java 3D's Canvas3D class (where a scene is rendered) with a Swing-based GUI and display the scene in a full-screen window. We will build a Java 3D scene graph that is lit with ambient and directional lights, has a blue-sky background, and is filled with multicolored spheres. The spheres gradually rotate, change color, and fade in and out of view. These dynamic elements are driven by a simple subclass of Java 3D's Behavior acting as a timer, which triggers updates to the scene every 50 milliseconds. The user's viewpoint (the camera) can be zoomed in and out, panned, and rotated with the mouse and control keys (courtesy of Java 3D's OrbitBehavior class). We will then convert the example into a screensaver with the help of JScreenSaver, a Java-based Microsoft Windows screensaver loader. [ABSTRACT FROM AUTHOR]