Java Reference
In-Depth Information
Firstly, one of the important controls that can be selected in View is the projection
policy, which may be parallel or perspective in nature. Under parallel projection, the view
volume is cubic in shape and objects rendered will not change in size even as the viewing
distance has changed. The rendering is based on projecting parallel rays from the objects
on to the canvas. On the other hand, in perspective projection, the view volume or frustum
has a pyramid shape with apex cut off. Perspective projection is of course the same as that
used in the human visual system, with nearer objects appearing bigger in size. Figure 8
illustrates how the projection policy can be set and the results obtained.
clIp dIstance
As shown in Figure 1, the front and back clip distances define the starting and ending
planes for the volume of space in which objects will be rendered. Before specifying these
distances as illustrated in Figure 9, the unit and point of reference of their measurements
can be set through methods on the clip polices. Specifically, the measurement may be in
physical or virtual units relative to the eye or screen position.
WIndoW eyepoInt polIcy and fIeld of vIeW
Apart from the clipping distances, which determine the front and back planes of the view
volume, another set of parameters that defines the view volume is the window eyepoint
Figure 9. Clip policy and distance
public int getFrontClipPolicy
public void setFrontClipPolicy(int policy)
public int getBackClipPolicy
public void setBackClipPolicy(int policy)
// Get and set the front and back clipping policies. Options are
// View.PHYSICAL_EYE - measurement relative to the eye position in meter
// View.PHYSICAL_SCREEN - measurement relative to screen in meter
// View.VIRTUAL_EYE - measurement relative to the eye in virtual distance
// View.VIRTUAL_SCREEN - measurement relative to the screen in virtual distance
public double getFrontClipDistance
public void setFrontClipDistance(double distance)
public double getBackClipDistance
public void setBackClipDistance(double distance)
// Get and set front and back clip distances. The defaults are 0.1 and 10.0, respectively.
Search WWH ::

Custom Search