pset_view_rep3(3g) — Subroutines
Name
pset_view_rep3 − Defines an index and the values of its associated entry for the workstation view table.
Operating States: PHOP, WSOP, ∗, ∗
PHIGS standard function
Syntax
void pset_view_rep3 (
Pint wsid, /∗ (I) Workstation identifier ∗/
Pint index, /∗ (I) View index ∗/
const Pview_rep3 ∗rep /∗ (I) View representation ∗/
)
Data Structures
typedef struct {
Pmatrix3 ori_matrix; /∗ orientation matrix ∗/
Pmatrix3 map_matrix; /∗ mapping matrix ∗/
Plimit3 clip_limit; /∗ clipping limits ∗/
Pclip_ind xy_clip; /∗ xy-clipping indicator ∗/
Pclip_ind back_clip; /∗ back clipping indicator ∗/
Pclip_ind front_clip; /∗ front clipping indicator ∗/
} Pview_rep3;
typedef Pfloat Pmatrix3[4][4];
typedef struct {
Pfloat x_min; /∗ x minimum ∗/
Pfloat x_max; /∗ x maximum ∗/
Pfloat y_min; /∗ y minimum ∗/
Pfloat y_max; /∗ y maximum ∗/
Pfloat z_min; /∗ z minimum ∗/
Pfloat z_max; /∗ z maximum ∗/
} Plimit3;
typedef enum {
PIND_NO_CLIP, /∗ clipping disabled ∗/
PIND_CLIP /∗ clipping enabled ∗/
} Pclip_ind;
Description
pset_view_rep3 allows you to create or redefine an index and the values of its associated entry for the workstation view table. The two specified matrices and the specified view clipping limits make up the three stages of viewing.
The specified index value must be greater than 0. The 0 index and its associated table entry values are predefined by Digital PHIGS and cannot be changed.
The index entry 0 in each view table is illustrated in the hardcopy and Bookreader versions of the documentation.
The elements of a view table entry are:
•View orientation matrix
Positions, rotates, or otherwise transforms homogeneous coordinate points in world coordinate units to orient information with respect to right-left, top-bottom, and front-back. This orientation establishes the view reference coordinate system. The peval_view_ori_matrix3 function generates the value for this input argument, as output to that function’s view orientation matrix argument. The view orientation matrix is a 4 x 4 matrix.
•View mapping matrix
Represents transformations of oriented information, such as perspective and parallel viewing transformation. The view mapping matrix transforms points in view reference coordinates to points in the normalized projection coordinate system. The peval_view_map_matrix3 function generates the value for this input argument as output to that function’s view mapping matrix argument. The view mapping matrix is a 4 x 4 matrix.
The view mapping matrix is not the only place in the transformation pipeline in which such mapping operations occur, nor is the view mapping matrix limited to performing such operations. See Getting Started with DEC PHIGS for more information on the view mapping matrix.
•View clipping limits
Specifies the region of normalized projection coordinate space in which visible data may appear when clipping is turned on and when clipping defined by the workstation window is ignored. To create the view clipping matrix, you specify six values in the order XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX.
The XMIN and YMIN values must be less than the XMAX and YMAX values, respectively. The ZMIN value must be less than or equal to the ZMAX value.
The six values define a rectangular parallelepiped that is oriented such that its edges are parallel to the normalized projection coordinate axes.
•xy-clipping indicator
Controls the clipping against the planes defined by XMIN, XMAX, YMIN, and YMAX. It is set to one of two values of the enumerated data
PIND_CLIP or PIND_NO_CLIP. If the xy-clipping indicator value is PIND_NO_CLIP, the region of normalized projection coordinate space in which visible data can appear is unlimited in x and y.
•Back-clipping indicator
Controls the clipping against the ZMIN plane. It is set to one of two values of the enumerated data type: PIND_CLIP or PIND_NO_CLIP. If the back-clipping indicator value is PIND_NO_CLIP, the region of normalized projection coordinate space in which visible data can appear is unlimited in the negative z direction.
•Front-clipping indicator
Controls the clipping against the ZMAX plane. It is set to one of two values of the enumerated data type: PIND_CLIP or PIND_NO_CLIP. If the front-clipping indicator value is PIND_NO_CLIP, the region of normalized projection coordinate space in which visible data can appear is unlimited in the positive z direction.
The pset_view_rep3 function has the following effects:
•Values are set for the specified view in these workstation state list entries:
•Requested view orientation matrix
•Requested view mapping matrix
•Requested view clipping limits
•Requested xy-clipping indicator
•Requested back-clipping indicator
•Requested front-clipping indicator
The function updates requested entries, rather than current entries, because the visual effect of setting a view table entry may be deferred.
•The viewing transformation update state entry in the workstation state list is set to PENDING on the specified workstation.
The next time the workstation is updated, the following actions occur:
•The corresponding current values for the specified view in the workstation state list are set to the requested entry values specified in this function.
•The viewing transformation update state entry in the workstation state list is set to NOTPENDING.
See Also
peval_view_map_matrix3
peval_view_ori_matrix3
pe_inq_ext_view_rep3
pset_view_ind
pset_view_rep
pset_view_tran_in_pri
pupd_ws