Java Reference
In-Depth Information
multIple vIeWs
Before studying how multiple views can be created and the various issues involved, Fig-
ure 4 shows the code structure that will be used in our ensuring discussion. The methods
createViewGraph, createViewPlatform, and vpTransform3D are especially important as
these are where different views can be created and changed. Also, viewManager as used
in subsequent code segments corresponds to an instance of a custom utility class View-
Manager, which is given in Appendix C. Basically, this formats the Canvas3D objects on
the window to the same size, adds appropriate captions, facilitates the addition of controls
such as buttons, drop down, and check boxes to the window, and have these laid out in a
grid manner.
As an illustrating example, Figure 5 shows the scene graph for getting a front, side, and
overhead view of the visual objects in 3D world. To obtain these three views at the same
time, the scene graph will now consist of three transform groups and three sets of view
platforms under two levels of transforms.
The first transform group TG, a child of the branch group BG, is for the purpose of
navigation, while the second level of transforms allows the user to see different views
from different orientation and position at the current location. Obviously, getting multiple
Figure 5. Multiple view scene graph
Search WWH ::

Custom Search