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 integer, called the view index. In this manual, the variable corresponding to this index is called VIEW_IND.

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 pset_view_ind (view_ind) 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 pset_view_rep (in 2D) or pset_view_rep3 (in 3D) functions. The parameters of these two functions are : the workstation identifier ws_id, the view index view_ind, and a C structure specifying the view. A view may therefore be defined differently from one workstation to another.

The fields included in C structure are built using the following PHIGS utilities : peval_view_ori_matrix and peval_view_map_matrix (in 2D) or peval_view_ori_matrix3 and peval_view_map_matrix3 (in 3D). The use of these functions is explained in the GPHIGS manuals.


Previous Next Up Title Contents Index Functions Index Top Library