summaryrefslogtreecommitdiff
path: root/xc/unsupported/doc/PHIGS/man3/p392
blob: 72a367615453ab84bcc1250e311ad4cfb0a994bf (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
.\"##
.\" $XConsortium: p392,v 5.2 94/04/17 20:59:02 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 WORKSTATION WINDOW 3" 3P "29 February 1991"
.SH NAME
SET WORKSTATION WINDOW 3 \- specify a \s-2\&3D\s+2 window to be displayed
on the specified workstation
.IX "Workstation Transformation" "SET WORKSTATION WINDOW 3"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.5i 3i
.nf
void
pset_ws_win3 ( ws, window )
Pint	ws;	\fIworkstation id\fP
Plimit3	*window;	\fIworkstation window limits\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, WSOP, *, *)
.SH DESCRIPTION
.SS Purpose
\s-2SET WORKSTATION WINDOW 3\s+2
defines the \s-2\&3D\s+2 volume in Normalized Projection Coordinate 
(\s-2NPC\s+2) space
to be displayed on the specified workstation.  
The workstation window is a rectangular box in \s-2NPC\s+2 space, which is mapped
to the workstation viewport, defined in Device Coordinate (\s-2DC\s+2) space.
.LP
Together, the workstation window and the workstation viewport
define the \fIworkstation transformation\fP that converts the image
from \s-2NPC\s+2 to \s-2DC\s+2 on the workstation's physical display surface.  
The workstation window defines what within \s-2NPC\s+2 space is displayed;  
the workstation viewport defines where the image is displayed in \s-2DC\s+2
space.  
.LP
Control of the workstation window allows you to choose
a portion of the abstract image
composed in \s-2NPC\s+2 space for display on the workstation,
without changing the definition of the image in \s-2NPC\s+2 space.  
.SS C Input Parameters
.IP \fIws\fP
The identifier of the workstation for which the window is to be set.  
.IP \fIwindow\fP
A pointer to a structure containing the six \s-2NPC\s+2 
\fIworkstation window limits\fP, defined as follows:  
.nf
.ta .5i +\w'Pfloat     'u +\w'x_max;     'u
.sp .4
typedef struct  {
.sp .2
	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 */
.sp .2
} Plimit3;
.fi
.SS Execution
.LP
The current workstation window defines the rectangular box in
Normalized Projection Coordinates (\s-2NPC\s+2) containing the portion of
the abstract image to be displayed within the current workstation viewport.  
Together, the workstation window and the workstation viewport
define an isotropic \fIworkstation transformation\fP that converts the image
from \s-2NPC\s+2 to \s-2DC\s+2 on the workstation's physical display surface.  
.LP
The range for each of the \fIworkstation window limits\fP is [0,1].  
In addition, \fIx minimum\fP must be less than \fIx maximum\fP,
\fIy minimum\fP must be less than \fIy maximum\fP, and
\fIz minimum\fP must be less than or equal to \fIz maximum\fP.  
Output is automatically clipped at the workstation window limits, and
this clipping cannot be disabled.  
.LP
\s-2SET WORKSTATION WINDOW 3\s+2 sets the requested workstation window
in the specified workstation's state list
to the values specified in \fIwindow\fP.  
The effect of calling \s-2SET WORKSTATION WINDOW 3\s+2 is visible
only after the requested workstation window replaces the 
current workstation window.  
The time at which this occurs
depends on the workstation's display update state.  
This action is performed immediately,
and the \fIworkstation transformation update state\fP is set to 
\s-2NOTPENDING\s+2,
if any one of the following is true:  
.sp .5v
.in +0.5i
.ta +0.2i
.ti -0.2i
\(bu	The workstation's display update state allows update.  
.sp .5v
.ti -0.2i
\(bu	The workstation's modification mode is any value other than
\fINo Immediate Visual Effect\fP,
and the \fIdynamic modification accepted for workstation transformation\fP 
entry in the workstation description table is set to Immediate.  
.sp .5v
.ti -0.2i
\(bu	The \fIdisplay space empty\fP status in the workstation state list
is \s-2EMPTY\s+2.  
.LP
Otherwise,
the workstation transformation update state is set to \s-2PENDING\s+2,
and the requested workstation window will not replace
the current workstation window until
the next time the workstation is updated.  
The workstation transformation update state will be set to \s-2NOTPENDING\s+2
at that time.  
.LP
If the current workstation window and viewport do not have the same aspect
ratios, the workstation transformation will preserve the proportions of the
image by mapping the workstation window to the largest parallelopiped within
the workstation viewport so that:  
.sp .5v
.in +0.5i
.ta +0.2i
.ti -0.2i
\(bu	The aspect ratio of the window in \fIx\fP
and \fIy\fP is maintained.
.sp .5v
.ti -0.2i
\(bu	The lower left hand corner of the window closest to 0
is mapped to the lower left hand corner of the viewport
furthest from the observer.
.sp .5v
.ti -0.2i
\(bu	The \fIz\fP extent of the workstation window is mapped to the entire
\fIz\fP extent of the workstation viewport.  
.LP
If the aspect ratios of the workstation window and viewport are different,
there will be unused space along the upper or
right-hand edges of the viewport, but not both.  
.LP
The default workstation transformation maps the entire \s-2NPC\s+2 view volume,
[0,1] \(mu [0,1] \(mu [0,1], onto the largest parallelopiped in the
workstation display space including the display's lower left corner
furthest from the observer.  
.\"different:	The workstation transformation can be changed at any time after
.\"different:	the workstation is opened. However, changing the transformation
.\"different:	may cause an implicit regeneration of the picture regardless of
.\"different:	the explicit setting of the workstation's display update state.
.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 151
Ignoring function, invalid window;
\s-2XMIN \(>= XMAX, YMIN \(>= YMAX,\s+2 or \s-2ZMIN > ZMAX\s+2
.IP 156
Ignoring function, the workstation window limits are not within 
\s-2NPC\s+2 range
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "SET WORKSTATION VIEWPORT 3 (3P)"
.SM "SET WORKSTATION WINDOW (3P)"
.fi