xenocara/doc/gl-docs/GLU/nurbscurve.3gl

100 lines
3.3 KiB
Plaintext
Raw Normal View History

2006-11-29 10:01:51 -07:00
'\" 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