summaryrefslogtreecommitdiff
path: root/xc/unsupported/doc/PHIGS/man3/p346
blob: 39d1f49920647ba89946dc1af97a9cd5d0b2e80f (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
.\"##
.\" $XConsortium: p346,v 5.1 91/02/16 09:43:46 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 MODELLING CLIPPING VOLUME" 3P "29 February 1991"
.SH NAME
SET MODELLING CLIPPING VOLUME \- create structure element to set the current modelling clipping volume
.IX "Modelling and Transformation Attributes" "SET MODELLING CLIPPING VOLUME"
.IX "Modelling Clipping" "SET MODELLING CLIPPING VOLUME"
.IX "Attributes, Modelling and Transformation Attributes" "SET MODELLING CLIPPING VOLUME"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
pset_model_clip_vol ( op, half_spaces )
Pint	op;	\fIoperator\fP
Phalf_space_list	*half_spaces;	\fIlist of half-spaces\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, *, STOP, *)
.SH DESCRIPTION
.SS Purpose
.LP
\s-2SET MODELLING CLIPPING VOLUME\s+2
creates a structure element
containing the operator and half-spaces specified, and places the element
in the current structure.  During traversal, this element is used to
modify the value of the current modelling clipping volume attribute,
which may affect all output primitives.
.LP
A \s-2SET MODELLING CLIPPING VOLUME\s+2 element contains two-dimensional 
half-spaces.  Each specified half-space is expanded to a three-dimensional 
half-space by setting the \fIz\fP-coordinate of the point and normal 
vector to zero.  These half-spaces are then transformed by the current 
composite modelling transformation.  These half-spaces are intersected 
to form a clipping volume.  
If no half-spaces are provided, then the clipping volume is defined to be all 
of modelling coordinate space.  Clipping volume is combined as specified by 
\s-2OPERATOR\s+2 with \fIcurrent modelling clipping volume\fP to form a new 
value of \fIcurrent modelling clipping volume\fP.  This volume is used to clip 
subsequent output primitives during structure traversal. 
.\" The resulting 
.\" clipping volume is not affected by subsequent modelling transformation 
.\" elements encountered during structure traversal.
.SS C Input Parameters
.IP \fIop\fP
The operator that describes the application of the
half-spaces
in this element to the current modelling clipping volume.
Operator values defined in phigs.h are:
.nf
.ta .5i +\w'PMC_INTERSECT     'u
.sp .2
	PMC_REPLACE	\fIReplace\fP
	PMC_INTERSECT	\fIIntersect\fP
.fi
.sp .2
.IP \fIhalf_spaces\fP
The list of half-spaces to store in the element.
Phalf_space_list is defined in phigs.h as:
.nf
.ta .5i +\w'Phalf_space     'u +\w'num_half_spaces;     'u
.sp .4
typedef struct {
.sp .2
	Pint	num_half_spaces; 	/* number of half-spaces */
	Phalf_space	*half_spaces;	/* list of half-spaces */
.sp .2
} Phalf_space_list;
.fi
.sp .2
The number is the number of half-spaces in the array of Phalf_space
elements pointed to by half-spaces,
as specified by a point, and the normal to the plane containing the point,
in the direction of the half-space.
Phalf_space is defined in phigs.h as:
.nf
.ta .5i +\w'Ppoint   'u +\w'norm;     'u
.sp .4
typedef struct {
.sp .2
	Ppoint	point;	/* point */
	Pvec	norm;	/* normal */
.sp .2
} Phalf_space;
.fi
.sp
Ppoint and Pvec are similar structures (but have different semantics), defined by phigs.h:
.nf
.ta .5i +\w'Pfloat     'u +\w'x;     'u
.sp .4
typedef struct {
.sp .2
	Pfloat	x;	/* x coordinate */
	Pfloat	y;	/* y coordinate */
.sp .2
} Ppoint;
.sp
.ta .5i +\w'Pfloat     'u +\w'delta_x;     'u
typedef struct {
.sp .2
	Pfloat	delta_x;	/* x magnitude */
	Pfloat	delta_y;	/* y magnitude */
.sp .2
} Pvec;
.fi
.sp
The \s-2\&2D\s+2 point and normal vector are expanded to \s-2\&3D\s+2 by using
.I z
components equal to 0.
.SS Execution
.LP
If the current edit mode is \s-2INSERT\s+2, a
\s-2SET MODELLING CLIPPING VOLUME\s+2 element is inserted
into the currently open
structure after the element pointed to by the current element pointer. If
the edit mode is \s-2REPLACE\s+2, the new element
replaces the element pointed to by the element pointer. In either case, the
element pointer is updated to point to the new element.
.LP
During traversal, this element is used to
modify the value of the current modelling clipping volume attribute,
which affects all output primitives.
This volume is used to clip 
subsequent output primitives during structure traversal. 
.\" The resulting 
.\" clipping volume is not affected by subsequent modelling transformation 
.\" elements encountered during structure traversal.
.SH ERRORS
.IP 005
Ignoring function, function requires state 
(\s-2PHOP\s+2, \s-2*\s+2, \s-2STOP\s+2, \s-2*\s+2)
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "INQUIRE MODELLING CLIPPING FACILITIES (3P)"
.SM "SET MODELLING CLIPPING INDICATOR (3P)"
.SM "RESTORE MODELLING CLIPPING VOLUME (3P)"
.SM "SET MODELLING CLIPPING VOLUME 3 (3P)"
.fi