summaryrefslogtreecommitdiff
path: root/xc/unsupported/doc/PHIGS/man3/p302
blob: 39758fb1db01c0546451326a7c1766289c24e1bf (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
.\"##
.\" $XConsortium: p302,v 5.2 94/04/17 20:57:57 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.
.ds f \s-2SET CURVE APPROXIMATION CRITERIA\s+2
.TH "SET CURVE APPROXIMATION CRITERIA" 3P+ "29 February 1991"
.SH NAME
SET CURVE APPROXIMATION CRITERIA \- create a structure element to set the curve approximation criteria
.IX "Aspect Source Flags" "SET CURVE APPROXIMATION CRITERIA"
.IX "Line Attributes" "SET CURVE APPROXIMATION CRITERIA"
.IX "Attributes, Line Attributes" "SET CURVE APPROXIMATION CRITERIA"
.\".IX "PHIGS Extension Functions" "SET CURVE APPROXIMATION CRITERIA"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
pset_curve_approx ( type, value )
Pint	type;	\fIapproximation type\fP
Pfloat	value;	\fIapproximation value\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, *, STOP, *)
.SH DESCRIPTION
.SS Purpose
\s-2SET CURVE APPROXIMATION CRITERIA\s+2 
places into the currently 
open structure a structure element
that specifies the curve approximation type and value.  
The curve approximation type controls the display precision of
non-uniform B-spline curves by specifying the method to use to render the
curve.  
.LP
When the current curve approximation criteria
Aspect Source Flag (\s-2ASF\s+2) is set to
\s-2INDIVIDUAL\s+2,
the current value of this attribute
defines the curve approximation criteria
to be applied to the following output primitive:
.RS
.LP
\(bu
.SM "NON-UNIFORM B-SPLINE CURVE"
.LP
\(bu
.SM "GENERALIZED DRAWING PRIMITIVE"
.LP
\(bu
.SM "GENERALIZED DRAWING PRIMITIVE 3"
.RE
.SS C Input Parameters
.IP \fItype\fP
The curve approximation type.  Possible values defined in phigs.h are:
.sp
.nf
.ta .5i
1	PCURV_WS_DEP
2	PCURV_CONSTANT_PARAMETRIC_BETWEEN_KNOTS
3	PCURV_CHORDAL_SIZE_WC
4	PCURV_CHORDAL_SIZE_NPC
5	PCURV_CHORDAL_SIZE_DC
6	PCURV_CHORDAL_DEVIATION_WC
7	PCURV_CHORDAL_DEVIATION_NPC
8	PCURV_CHORDAL_DEVIATION_DC
.ig XX
9	PCURV_REL_WC
10	PCURV_REL_NPC
11	PCURV_REL_DC
.XX
.fi
.sp
.IP \fIvalue\fP
The value to use when applying the specified approximation method.
Valid values depend on the approximation method specified.  See the
\fIExecution\fP section below for a description of the use of
\fIvalue\fP by each approximation method.
.SS Execution
.LP
Depending upon the edit mode, a \s-2SET CURVE APPROXIMATION CRITERIA\s+2
element is inserted into the open structure after the element pointer,
or replaces the element pointed at by the element pointer. The element
pointer is then updated to point to this \s-2SET CURVE
APPROXIMATION CRITERIA\s+2 element.
.LP
The approximation methods corresponding to the defined approximation types
and the use of the approximation value by each method are:
.IP "\fIImplementation Dependent, Type 1\fP"
Use an implementation-dependent approximation method.
This method is defined by the server.
.IP "\fIConstant Parametric Subdivision Between Knots, Type 2"
Tessellate using equal parametric increments between each  pair
of knots on the curve.
The integer portion of the approximation value is used and
interpreted as follows:
.RS
.IP
\(<= 0: Evaluate the curve only at the parameter limits and at the knots
that fall within the parameter limits.
.IP
> 0: Evaluate the curve at the parameter limits, at the knots that fall
within the parameter limits, and at the specified number of
positions between each pair of knots, but only if the position is within
the parameter limits.
.RE
.IP "\fIChordal Size in WC, Type 3\fP"
Tessellate until the length in World Coordinates (\s-2WC\s+2) of 
every line segment
(chord) representing the curve is less than the specified positive
real-number approximation value.
.IP "\fIChordal Size in NPC, Type 4\fP"
Tessellate until the length in Normalized Projection Coordinates 
(\s-2NPC\s+2) of every line segment (chord) representing the curve 
is less than the specified positive real-number approximation value.
.IP "\fIChordal Size in DC, Type 5\fP"
Tessellate until the length in Device Coordinates (\s-2DC\s+2) of 
every line segment (chord) representing the curve 
is less than the specified positive real-number approximation value.
.ig XX
.LP
\s-2PEX-SI\s0 approximates this approximation type by a different adaptive
method.  The method used adjusts the tessellation of the curve according
to the modelling and viewing transforms in effect when the curve is
traversed.  The approximation value corresponds to the maximum length of
a tessellated segment, as a percentage of the workstation viewport.  If
an approximation value less than, or equal to, 0.0 is specified, the value
0.01 (1 percent) will be used.
.XX
.IP "\fIChordal Deviation in WC, Type 6\fP"
Tessellate until the absolute value of the maximum deviation measured in
\s-2WC\s+2 between the curve and approximating line segment (chord)
is less than the specified positive real-number approximation value.
.IP "\fIChordal Deviation in NPC, Type 7\fP"
Tessellate until the absolute value of the maximum deviation measured in
\s-2NPC\s+2 between the curve and approximation line segment (chord) is 
less than the specified positive real-number approximating value.
.IP "\fIChordal Deviation in DC, Type 8\fP"
Tessellate until the absolute value of the maximum deviation measured in
\s-2DC\s+2 between the curve and approximation line segment (chord) is 
less than the specified positive real-number approximating value.
.ig XX
.LP
\s-2PEX-SI\s0 approximates this approximation type by a different adaptive
method.  The method used adjusts the tessellation of the curve according
to the modelling and viewing transforms in effect when the curve is
traversed.  The approximation value corresponds to the maximum length of
a tessellated segment, as a percentage of the workstation viewport.  If
an approximation value less than, or equal to, 0.0 is specified, the value
0.01 (1 percent) will be used.
.XX
.ig XX
.IP "\fIRelative in WC, Type 9\fP"
Maintain a relative level in quality based on the tolerance value 
independent of scaling in World Coordinates.
.IP "\fIRelative in NPC, Type 10\fP"
Maintain a relative level in quality based on the tolerance value 
independent of scaling in Normalized Projection Coordinates.
.IP "\fIRelative in DC, Type 11\fP"
Maintain a relative level in quality based on the tolerance value 
independent of scaling in Deviation Coordinates.
.XX
.LP
At traversal time, the default approximation type is used
if the specified approximation
type is not supported by the workstation.
If the approximation value is inconsistent with the specified approximation
type, a value of 1.0 will be used.
The approximation types supported by a workstation type can be determined
with the function 
\s-2INQUIRE CURVE AND SURFACE FACILITIES\s+2,
or by consulting the relevant entries in
\s-2PHIGS WORKSTATION DESCRIPTION TABLE (7P)\s+2.
.LP
When the current curve approximation criteria \s-2ASF\s+2 is set to
\s-2INDIVIDUAL\s+2, output primitives that follow in
the structure network are filled using the current curve 
approximation criteria style.
.LP
When the current curve approximation criteria
\s-2ASF\s+2 is set to \s-2BUNDLED\s+2,
the curve approximation criteria is taken from the
workstation extended representation indicated by the current polyline index.
In this case, the curve approximation criteria
set with \s-2SET CURVE APPROXIMATION CRITERIA\s+2 has no effect.
.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 "NON-UNIFORM B-SPLINE CURVE (3P+)"
.SM "INQUIRE CURVE AND SURFACE FACILITIES (3P+)"
.ig XX
.SM "SET INDIVIDUAL ASF (3P)"
.SM "INTRO PHIGS PLUS (3P+)"
.XX
.fi