Positioning and Moving the User s Viewpoint


Class Diagrams for FPShooter3D

Figure 24-2 shows the class diagrams for the FPShooter3D application. The class names and public methods are included.

FPShooter3D is the top-level JFrame for the application and similar to earlier JFrame classes. WrapFPShooter3D creates the 3D scene as usual and adds the target and viewer elements. The target (a robot) is loaded with PropManager, a class first seen in Chapter 16 in the Loader3D example. The gun-in-hand image is a transparent GIF loaded and displayed by a TexturedPlane object. CheckerFloor and ColouredTiles manage the checkerboard, as in earlier examples. They were first encountered in Chapter 15, in Checkers3D.

Figure 24-2. Class diagrams for FPShooter3D


A LaserShot object represents a single beam and its (possible) explosion. The sequence of explosion images are stored in an ImageCsSeries object, a variant of the ImagesSeries class from Chapter 23. The animation of the beam and explosion is initiated from an AnimBeam tHRead. AmmoManager manages a collection of LaserShot objects, which allows the application to display several beams and explosions concurrently.

The code for this application is in the directory FPShooter3D/.




Killer Game Programming in Java
Killer Game Programming in Java
ISBN: 0596007302
EAN: 2147483647
Year: 2006
Pages: 340

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net