summaryrefslogtreecommitdiff
path: root/xc/unsupported/doc/PHIGS/man3/p386
blob: 7840044b2f927cd37659a7d39d904445549a09f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
.\"##
.\" $XConsortium: p386,v 5.1 91/02/16 09:44:38 rws Exp $
.\"##
.\"## 
$XMCOPY
.\"## Copyright (c) 1990, 1991 by Sun Microsystems, Inc. 
.\"## 
.\"##                         All Rights Reserved
.\"## 
.\"## Permission to use, copy, modify, and distribute this software and its 
.\"## documentation for any purpose and without fee is hereby granted, 
.\"## provided that the above copyright notice appear in all copies and that
.\"## both that copyright notice and this permission notice appear in 
.\"## supporting documentation, and that the name of Sun Microsystems,
.\"## not be used in advertising or publicity 
.\"## pertaining to distribution of the software without specific, written 
.\"## prior permission.  
.\"## 
.\"## SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
.\"## INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
.\"## EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
.\"## CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
.\"## USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
.\"## OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\"## PERFORMANCE OF THIS SOFTWARE.
.TH "SET VIEW REPRESENTATION" 3P "29 February 1991"
.SH NAME
SET VIEW REPRESENTATION \- define a \s-2\&2D\s+2 view representation entry on a
workstation
.IX "Viewing" "SET VIEW REPRESENTATION"
.IX "Attribute Representations" "SET VIEW REPRESENTATION"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.5i 3i
.nf
void
pset_view_rep ( ws, index, rep )
Pint	ws;	\fIworkstation identifier\fP
Pint	index;	\fIview index\fP
Pview_rep	*rep;	\fIview representation\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, WSOP, *, *)
.SH DESCRIPTION
.SS Purpose
\s-2SET VIEW REPRESENTATION\s+2 defines a view representation entry
in the workstation's view table, using a two-dimensional model.
A view representation defines how the composited objects are
to be represented in relation to the viewer.
.LP
A view representation controls the viewing stage of the transformation
pipeline, which transforms coordinates in
World Coordinates \s-2(WC)\s+2 to Normalized Projection Coordinates \s-2(NPC)\s+2,
and optionally clips to the limits of \s-2NPC\s+2 space.
.SS C Input Parameters
.IP \fIws\fP
The identifier of the workstation for which the view
representation is being defined.
.IP \fIindex\fP
The view index of the entry being defined.
.IP \fIrep\fP
A pointer to a Pview_rep structure containing the 
values in the view representation, defined in phigs.h as follows:
.nf
.ta .5i +\w'Pclip_ind     'u +\w'orientation_matrix;    'u
.sp .4
typedef struct {
.sp .2
	Pmatrix	ori_matrix;	/* view orientation matrix */
	Pmatrix	map_matrix;	/* view mapping matrix */
	Plimit	clip_limit;	/* clipping limits */
	Pclip_ind	xy_clip;	/* x-y clipping indicator */
.sp .2
} Pview_rep;
.sp .2
.fi
.IP
Pmatrix is defined in phigs.h as follows:
.sp .2
typedef  Pfloat  Pmatrix[3][3];
.sp .4
.IP
Plimit is defined in phigs.h as follows:
.nf
.ta .5i +\w'Pfloat     'u  +\w'xmin;     'u
.sp .4
typedef struct {
.sp .2
	Pfloat	x_min;	/* x min */
	Pfloat	x_max;	/* x max */
	Pfloat	y_min;	/* y min */
	Pfloat	y_max;	/* y max */
.sp .2
} Plimit;
.sp .2
.fi
.IP
Pclip_ind is defined in phigs.h as follows:
.nf
.ta .5i +\w'PIND_CLIP,     'u
.sp .2
typedef enum {
.sp .2
	PIND_NO_CLIP,
	PIND_CLIP
.sp .2
} Pclip_ind;
.sp .2
.fi
.IP
The \fIori_matrix\fP is the 3 \(mu 3 homogeneous
view orientation matrix,
probably from \s-2EVALUATE VIEW ORIENTATION MATRIX\s+2.
.IP
The \fImap_matrix\fP is the 3 \(mu 3 homogeneous
view mapping matrix,
probably from \s-2EVALUATE VIEW MAPPING MATRIX\s+2.
.IP
The \fIclip_limit\fP contains the 4 Pfloat clipping limits:
\fIx_min\fP, \fIx_max\fP,
\fIy_min\fP, and \fIy_max\fP.
.IP
The \fIxy_clip\fP contains the \fIx-y\fP clip indicator
for the \fIx\fP and \fIy\fP axes.
.SS Execution
\s-2SET VIEW REPRESENTATION\s+2 defines a view representation entry
in the workstation's view table using a two-dimensional model.
.LP
The \fIcurrent view index\fP attribute applied
to each output primitive at traversal time determines which view
representation is used to map the primitive from \s-2WC\s+2 space to
\s-2NPC\s+2 space, typically with a
parallel or perspective projection.
.LP
This viewing process for each output primitive is accomplished in three stages:
.IP 1.
The \fIview orientation matrix\fP is applied to orient
View Reference Coordinate \s-2(VRC)\s+2 space with respect to
\s-2WC\s+2 space.  Use the utility function \s-2EVALUATE
VIEW ORIENTATION MATRIX\s+2 to generate this matrix
from a \fIview reference point\fP and \fIview up vector\fP
specified in \s-2WC\s+2. The view reference point becomes the
origin of \s-2VRC\s+2 and the view up vector orients the \s-2VRC\s+2 \fIv\fP axis.
.IP 2.
The \fIview mapping matrix\fP is applied to map the \s-2VRC\s+2 system
to the \s-2NPC\s+2 system. Use the utility function
\s-2EVALUATE VIEW MAPPING MATRIX\s+2 to generate this matrix. The
utility accepts a specified \fIview area\fP called a window in \s-2VRC\s+2 space
to be mapped onto a specified \fIprojection viewport\fP in \s-2NPC\s+2 space.
The projection is established in relation to the \fIprojection reference 
point\fP, also specified in \s-2VRC\s+2 space.
The projection may be perspective or parallel, oblique
or non-oblique.
.IP 3.
Clipping limits are optionally applied. The \fIview clipping limits\fP
define an area of \s-2NPC\s+2.  When a clipping
indicator is set to \fIClipping\fP, any portion
of an object beyond that limit is not displayed.
.IP
\fBNote\fP: These clipping limits are typically identical to the
projection viewport provided to
\s-2EVALUATE VIEW MAPPING MATRIX\s+2. If the clipping limits differ
from the projection viewport, the object portions mapped by the
\fIview mapping matrix\fP to be within the clipping limits in \s-2NPC\s+2 are
displayed.
.LP
In any case, objects are subject to workstation clipping, which
may not be disabled.  The maximum volume of \s-2NPC\s+2 space that may
be displayed is from 0 to 1 in all dimensions.
.\".RE
.LP
The immediate visual effect of changing a view representation depends on
the workstation's \fIdisplay update state\fP. When \s-2SET
VIEW REPRESENTATION\s+2 is called, the display update state may prohibit
immediate updating (that is, regeneration) of the workstation's display.
In this case, the \fIview index\fP view table entry's
\fIviewing transformation update state\fP is set to \s-2PENDING\s+2, and the
following values for the entry
are set to the values being \fIrequested\fP by the function invocation:
.RS
.ta 0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i
.LP
\(bu	Requested view orientation matrix
.LP
\(bu	Requested view mapping matrix
.LP
\(bu	Requested view clipping limits
.LP
\(bu	Requested \fIx-y\fP clipping indicator
.ta
.RE
.LP
The next time the workstation is updated, for any view table
entry with the viewing transformation update state set to \s-2PENDING\s+2,
the values stored in the \fIrequested\fP entries
replace the corresponding \fIcurrent\fP values for that \fIview index\fP,
and the view entry's viewing transformation update state
is set to \s-2NOTPENDING\s+2. Then regeneration proceeds, and
the new viewing representations take effect.
.SS Default Representation
View index 0 is the default for the
\fIcurrent view index\fP in the traversal state list.
View table entry 0 is the default view representation, and cannot be changed.
The effect of the default representation is to map the \s-2VRC\s+2 rectangle [0,1]
x [0,1] to the \s-2NPC\s+2 rectangle [0,1] \(mu [0,1] without scaling, rotation, or
translation.
It contains the following values:
.sp
.RS
.\".ta 1.6i
.ta 0.2i +0.5i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i
.LP
\(bu	view orientation matrix			\fIIdentity Matrix\fP
.LP
\(bu	view mapping matrix			\fIIdentity Matrix\fP
.LP
\(bu	view clipping limits			\fIXmin \(eq 0 Xmax \(eq 1
                            	                       Ymin \(eq 0 Ymax \(eq 1\fP
.LP
\(bu	\fIx-y\fP clipping indicator			\fIPerform Clipping\fP
.fi
.RE
.DT
.SH ERRORS
.IP 003
Ignoring function, function requires state 
(\s-2PHOP\s+2, \s-2WSOP\s+2, \s-2*\s+2, \s-2*\s+2)
.IP 054
Ignoring function, the specified workstation is not open
.IP 057
Ignoring function, specified workstation is of category \s-2MI\s+2
.IP 115
Ignoring function, the view index value is less than one
.IP 150
Ignoring function, setting this view table entry would exceed
the maximum number of entries allowed in the workstation's view table
.IP 153
Ignoring function, invalid view clipping limits;
\s-2XMIN \(>= XMAX, YMIN \(>= YMAX,\s+2 or \s-2ZMIN > ZMAX\s+2
.IP 154
Ignoring function, the view clipping limits are not within \s-2NPC\s+2 range
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "SET VIEW INDEX (3P)"
.SM "EVALUATE VIEW ORIENTATION MATRIX (3P)"
.SM "EVALUATE VIEW MAPPING MATRIX (3P)"
.SM "SET VIEW TRANSFORMATION INPUT PRIORITY (3P)"
.SM "INQUIRE VIEW REPRESENTATION (3P)"
.SM "UPDATE WORKSTATION (3P)"
.SM "SET VIEW REPRESENTATION 3 (3P)"
.fi