A Fountain of Points


Class Diagrams for Particles3D

Figure 21-5 shows the class diagrams for the Particles3D program. Only the class names are shown.

Particles3D is the top-level JFrame for the application. WrapParticles3D creates the 3D scene and is similar to the earlier Wrap classes in that it creates the checkered floor and sets up lighting. WrapParticles3D invokes one of the three particle systems (PointParticles, LineParticles, or QuadParticles), depending on user input.

The PointParticles and LineParticles particle systems are subclasses of Shape3D, allowing them to be added to the 3D scene easily. QuadParticles is a subclass of OrientedShape3D and permits its on-screen representation to rotate towards the viewer.

Figure 21-4. Point particle systems class structure


The diagrams for the particle system classes show they use the inner classes approach with GeometryUpdater and Behavior classes. CheckerFloor and ColouredTiles are the same as in previous examples.



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