3.4.2.  Viewport Description

The portion of the virtual viewport to be rendered in each rendering window can be described with keywords (LEFT, RIGHT, CENTER,...). A more general description using viewport values is also available. SoFlatScreen SoFlatScreen SoFlatScreen has a field SoSFVec4f SoSFVec4f SoSFVec4f viewport used to set the 2D coordinates of the lower-left and upper-right corners of the region of the virtual viewport. The values for viewport are in the range of 0.0 to 1.0, (0,0) being the lower-left corner and (1,1) being the upper-right corner of the virtual viewport.

The view keyword (LEFT, RIGHT, etc.), on the other hand, is convenient for describing simple layouts because you do not have to enter the viewport values for trivial display configurations. ScaleViz calculates the viewport values automatically. For example, in the configuration file, if there are two SoFlatScreen SoFlatScreen SoFlatScreen s with view LEFT and RIGHT respectively, ScaleViz will set the viewport to [0.0, 0.0, 0.5, 1.0] for the first rendering window (left) and [0.5, 0.0, 1.0, 1.0] for the second rendering window (right).

However, using viewport values is a more general way to describe the portion of the scene to render on a particular display. Using viewport values allows you to describe various configurations that are not specifiable with view keywords. For instance, a display configuration consisting of one large display on top, two small displays in the middle, and one large display on the bottom can only be described using viewport values.

Figure 3.13. Four flat screens


Example of a RIGHT_LEFT configuration using one pipe:

Figure 3.14. Example of RIGHT_LEFT configuration using one pipe