Class Diagrams for Tour3DFigure 18-2 shows class diagrams for Tour3D. Only class names are shown here, to reduce the complexity of the diagram. Figure 18-2. Class diagrams for Tour3DTour3D is the top-level JFrame for the application. WrapTour3D creates the 3D scene and is similar to earlier Wrap classes in that it creates the checkered floor and sets up the lighting. This version loads the scenery and obstacles and creates the sprites. PropManager is unchanged from the class in the Loader3D application in Chapter 16. CheckerFloor and ColouredTiles are the same classes as in previous examples. The Obstacles class is new: it stores information about the scene's obstacles. The sprites are subclasses of Sprite3D. The robot is an instance of TourSprite, and the hand is an AlienSprite object. TourSprite is controlled by TouristControls, and TimeBehavior updates AlienSprite. TouristControls and TimeBehavior are subclasses of Java 3D's Behavior class.
|