JavaFX supports lighting and camera effects. The classes for these are AmbientLight, PointLight, ParallelCamera and PerspectiveCamera (package

Question:

JavaFX supports lighting and camera effects. The classes for these are AmbientLight, PointLight, ParallelCamera and PerspectiveCamera (package javafx.scene). Investigate each of these classes, then modify Exercise 22.10 to incorporate these capabilities. Provide a GUI that enables the user to control where the lights and cameras are located in the scene and which are active at a given time.

Exercise 22.10

Using the techniques create an app that continuously displays Boxes, Cylinders and Spheres on a Pane with random sizes, locations and diffuse colors. For each three-dimensional shape, create an AnimationTimer that moves and rotates the shape around. For bounds-testing purposes assume the depth of the z-axis is 400 pixels. As the shape moves along the z-axis it should shrink when moving away from the user and grow when moving towards the user.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java How To Program Late Objects Version

ISBN: 9780136123712

8th Edition

Authors: Paul Deitel, Deitel & Associates

Question Posted: