summaryrefslogtreecommitdiff
path: root/doc/gl-docs/GLU/nurbscurve.3gl
blob: b528cbbbcd959c6751bcb20e2241925efb7ffd7e (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
'\" e
'\"! eqn | mmdoc
'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 6 March 1997
.ds Re Release 1.2.0
.ds Dp May 02 11:53
.ds Dm 37 nurbscurv
.ds Xs 25594 5 nurbscurve.gl
.TH GLUNURBSCURVE 3G
.SH NAME
.B "gluNurbsCurve
\- define the shape of a NURBS curve

.SH C SPECIFICATION
void \f3gluNurbsCurve\fP(
GLUnurbs* \fInurb\fP,
.nf
.ta \w'\f3void \fPgluNurbsCurve( 'u
	GLint \fIknotCount\fP,
	GLfloat \fI*knots\fP,
	GLint \fIstride\fP,
	GLfloat \fI*control\fP,
	GLint \fIorder\fP,
	GLenum \fItype\fP )
.fi

.EQ
delim $$
.EN
.SH PARAMETERS
.TP \w'\fIknotCount\fP\ \ 'u 
\f2nurb\fP
Specifies the NURBS object (created with \%\f3gluNewNurbsRenderer\fP).
.TP
\f2knotCount\fP
Specifies the number of knots in \f2knots\fP.
\f2knotCount\fP equals the number of control points plus the order.
.TP
\f2knots\fP
Specifies an array of \f2knotCount\fP nondecreasing knot values.
.TP
\f2stride\fP
Specifies the offset (as a number of single-precision floating-point values)
between successive curve control points.
.TP
\f2control\fP
Specifies a pointer to an array of control points. The coordinates must
agree with \f2type\fP, specified below.
.TP
\f2order\fP
Specifies the order of the NURBS curve. \f2order\fP equals degree + 1, hence
a cubic curve has an order of 4.
.TP
\f2type\fP
Specifies the type of the curve. If this curve is defined within a 
\%\f3gluBeginCurve\fP/\%\f3gluEndCurve\fP pair, then 
the type can be any of the valid
one-dimensional evaluator types (such as \%\f3GL_MAP1_VERTEX_3\fP or 
\%\f3GL_MAP1_COLOR_4\fP). Between a \%\f3gluBeginTrim\fP/\%\f3gluEndTrim\fP pair,
the only valid types are \%\f3GLU_MAP1_TRIM_2\fP and \%\f3GLU_MAP1_TRIM_3\fP.
.SH DESCRIPTION
Use \%\f3gluNurbsCurve\fP to describe a NURBS curve.
.P
When \%\f3gluNurbsCurve\fP appears between a \%\f3gluBeginCurve\fP/\%\f3gluEndCurve\fP pair, it is 
used to describe a curve to be rendered.
Positional, texture, and color coordinates are associated
by presenting each as a separate \%\f3gluNurbsCurve\fP between a 
\%\f3gluBeginCurve\fP/\%\f3gluEndCurve\fP pair. No more than
one call to \%\f3gluNurbsCurve\fP for each of color, position, and texture
data can be made within a single \%\f3gluBeginCurve\fP/\%\f3gluEndCurve\fP
pair. Exactly one call must be made to describe the position of the 
curve (a \f2type\fP of \%\f3GL_MAP1_VERTEX_3\fP or \%\f3GL_MAP1_VERTEX_4\fP).
.P
When \%\f3gluNurbsCurve\fP appears between a \%\f3gluBeginTrim\fP/\%\f3gluEndTrim\fP pair, it is 
used to describe a trimming curve on a NURBS surface. If \f2type\fP is
\%\f3GLU_MAP1_TRIM_2\fP, then it describes a curve in two-dimensional (\f2u\fP 
and \f2v\fP)
parameter space. If it is \%\f3GLU_MAP1_TRIM_3\fP, then it describes a 
curve in two-dimensional homogeneous (\f2u\fP, \f2v\fP, and \f2w\fP) 
parameter space.
See the \%\f3gluBeginTrim\fP reference page for more discussion about trimming
curves.
.SH EXAMPLE
The following commands render a textured NURBS curve with normals:
.sp
.Ex
gluBeginCurve(nobj);
   gluNurbsCurve(nobj, ..., GL_MAP1_TEXTURE_COORD_2);
   gluNurbsCurve(nobj, ..., GL_MAP1_NORMAL);
   gluNurbsCurve(nobj, ..., GL_MAP1_VERTEX_4);
gluEndCurve(nobj);
.Ee
.sp
.SH NOTES
To define trim curves which stitch well, use \%\f3gluPwlCurve\fP.
.SH SEE ALSO
\%\f3gluBeginCurve(3G)\fP, \%\f3gluBeginTrim(3G)\fP, \%\f3gluNewNurbsRenderer(3G)\fP, \%\f3gluPwlCurve(3G)\fP