Previous Next Up Title Contents Index Functions Index Top Library

1.3.8. VIEWING

This set of PHIGS functions is used to define a view on a workstation. A view is the way of turning the structure(s) to be displayed, and projecting it (them) on the workstation display surface.

Several views may be defined at the same time. A structure may be displayed n times, e.g. from n different viewing angles. In addition, some structures in the CSS may be displayed from one viewing angle, and other structures from a different angle.

It is, therefore necessary to define a view by means of a positive whole number, called the view index. In this manual, the variable corresponding to this index is called VIEWID.

During traversal, the current view index determines which way the graphics primitive being processed is to be displayed. The current view index is defined by the PSVWI (VIEWID) function which has already been mentioned. It is a general attribute structure element. During traversal, it is taken into account by all types of primitives. It follows the same rules for inherited attributes as any other type of attribute (see attribute scope)

E.g. :

If the structure identifier S0 is posted, traversal initially displays the primitives of the structure S1 according to view index 1, then, the second time according to view index 2. Traversal then displays primitives p1 and p2 according to view index 2, then primitives p3 and p4 according to view index 3.

On a workstation, a view is defined by the PSVWR (in 2D) or PSVWR3 (in 3D) functions. The parameters of these two functions are : the workstation identifier WKID, the view index VIEWID, the orientation matrix, the mapping matrix and clipping flags. A view may therefore be defined differently from one workstation to another.

The orientation matrix and mapping matrix (defining the view) are built using the following PHIGS utilities : PEVOM and PEVMM (in 2D) or PEVOM3 and PEVMM3 (in 3D). The use of these functions is explained in the GPHIGS manuals.


Previous Next Up Title Contents Index Functions Index Top Library