Java Reference
In-Depth Information
vIeW attach polIcy and actIvatIon radIus
Having described the basic principles of generating multiple views in Java 3D, we will
now proceed to discuss in more details the options and settings that are available in the
customization of the various components in the process.
As depicted in Figures 1 and 2, the most important component in view generation is the
view platform. Usually under a suitable TransformGroup for navigation and other similar
purposes, a ViewPlatform defines a view point on the virtual world. It controls the location
and orientation of the user, and also serves as a node in the scene graph for attaching a
View object. As illustrated in Figure 5, a virtual universe may have many view platforms.
However, each ViewPlatform can only have one View object.
Every ViewPlatform object has a view attach policy and an activation radius. The lat-
ter defines a spherical region surrounding the center of the ViewPlatform. As discussed
in previous chapters, if this activation region intersects with the bounding and scheduling
regions for behaviors, fogs and similar objects, stimulus for the associated behaviors and
rendering of the fogs will be activated.
Figure 7. View attach policy and activation radius
public ViewPlatform ()
// Constructs a default ViewPlatform object with
// view attach policy = View.NOMINAL_HEAD and activation radius = 62
public int getViewAttachPolicy ()
public void setViewAttachPolicy(int policy)
// Get and set view attach policy to one of the following:
// View.NOMINAL_HEAD - the origin of virtual or physical coordinates is relative to the head
// View.NOMINAL_FEET - the origin is at the feet which is offset from the ground by the
// nominalEyeHeightFromGround parameter in the PhysicalBody object
// View.NOMINAL_SCREEN - the origin is at the center if the screen
// Setting capabilities for reading and writing view attach policy during run time
public float getActivationRadius()
public void setActivationRadius(float ActivationRadius)
// Get and set the activation radius which defines an activation volume around the view platform
View Platform
View Platform
View Platform
Search WWH ::

Custom Search