Advantages of the Java 3D View Model

As we said previously, for specific applications, you can make some simplifying assumptions and just recompute the projection matrix for the given situation. Unfortunately, when the viewing situation changes, the projection matrix has to be reanalyzed and recomputed. This means that even small variations in display size and other parameters can force the developer to maintain a different version of the source code. The ideal of Java is “Write once, run anywhere,” and most of us who program in Java believe strongly in this ideal even when it sometimes isn't fully true. The Java 3D view model takes this further by attempting to achieve “write once, view anywhere.” Even in the research environment in which code is not generally distributed to the general public, it is extremely handy to be able to change the display environment and computer platform and not have to worry about reprogramming the projection matrix.

The power of the Java 3D view model is that it allows you to specify one or more screens, where they are in relationship to each other, and where the eyes and head are relative to the screen. This physical configuration is then placed in the virtual world by establishing a coexistence point. The renderer can now blindly compute each frame based on one of the two big transform chains described previously.

Exactly how many transforms are there? The answer is a lot. Indeed, up to eight coordinate systems are at play in the Java 3D view model depending on which of the two chains of transforms is selected. By understanding these basic reference frames, the student will naturally begin to understand the transformations in and out of those coordinate systems in turn. Always try to remember that the purpose of a transformation is to convert data from one coordinate system to another.

Table 13.1 lists all the coordinate systems that are part of the Java 3D view model.

Table 13.1. Java 3D View Model Coordinate Systems
Coordinate System Relevant Classes and Methods
HeadTracker
PhysicalBody.setHeadToHeadTracker
Screen3D.setHeadTrackerToLeftImagePlate()
Screen3D.setHeadTrackerToRightImagePlate()

TrackerBase
PhysicalEnvironment.setCoexistenceToTrackerBase()
Screen3D.setTrackerBaseToImagePlate()

Head PhysicalBody
Image Plate (Screen)

RightImagePlate (HMD)

LeftImagePlate (HMD)
Screen3D
Coexistence
PhysicalEnvironment.setCoexsistence
ToTrackerBase
ViewPlatform.setViewAttachPolicy()

View Platform
ViewPlatform
View.attachViewPlatform()

Virtual World Locale

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset