xenocara/doc/gl-docs/GLU/nurbssurface.3gl
2006-11-29 17:01:51 +00:00

125 lines
4.1 KiB
Plaintext

'\" 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 nurbssurf
.ds Xs 28728 6 nurbssurface.gl
.TH GLUNURBSSURFACE 3G
.SH NAME
.B "gluNurbsSurface
\- define the shape of a NURBS surface
.SH C SPECIFICATION
void \f3gluNurbsSurface\fP(
GLUnurbs* \fInurb\fP,
.nf
.ta \w'\f3void \fPgluNurbsSurface( 'u
GLint \fIsKnotCount\fP,
GLfloat* \fIsKnots\fP,
GLint \fItKnotCount\fP,
GLfloat* \fItKnots\fP,
GLint \fIsStride\fP,
GLint \fItStride\fP,
GLfloat* \fIcontrol\fP,
GLint \fIsOrder\fP,
GLint \fItOrder\fP,
GLenum \fItype\fP )
.fi
.EQ
delim $$
.EN
.SH PARAMETERS
.TP \w'\fIsKnotCount\fP\ \ 'u
\f2nurb\fP
Specifies the NURBS object (created with \%\f3gluNewNurbsRenderer\fP).
.TP
\f2sKnotCount\fP
Specifies the number of knots in the parametric \f2u\fP direction.
.TP
\f2sKnots\fP
Specifies an array of \f2sKnotCount\fP nondecreasing knot values in the parametric
\f2u\fP direction.
.TP
\f2tKnotCount\fP
Specifies the number of knots in the parametric \f2v\fP direction.
.TP
\f2tKnots\fP
Specifies an array of \f2tKnotCount\fP nondecreasing knot values in the parametric
\f2v\fP direction.
.TP
\f2sStride\fP
Specifies the offset (as a number of single-precision floating point values)
between successive control points in the parametric \f2u\fP direction
in \f2control\fP.
.TP
\f2tStride\fP
Specifies the offset (in single-precision floating-point values)
between successive control points in the parametric \f2v\fP direction
in \f2control\fP.
.TP
\f2control\fP
Specifies an array containing control points for the NURBS surface.
The offsets between successive control points in the parametric \f2u\fP
and \f2v\fP directions are given by \f2sStride\fP and \f2tStride\fP.
.TP
\f2sOrder\fP
Specifies the order of the NURBS surface in the parametric \f2u\fP
direction. The order is one more than the degree, hence
a surface that is cubic in \f2u\fP has a \f2u\fP order of 4.
.TP
\f2tOrder\fP
Specifies the order of the NURBS surface in the parametric \f2v\fP
direction. The order is one more than the degree, hence
a surface that is cubic in \f2v\fP has a \f2v\fP order of 4.
.TP
\f2type\fP
Specifies type of the surface. \f2type\fP can be any of the valid
two-dimensional evaluator types (such as \%\f3GL_MAP2_VERTEX_3\fP or
\%\f3GL_MAP2_COLOR_4\fP).
.SH DESCRIPTION
Use \%\f3gluNurbsSurface\fP within a NURBS (Non-Uniform Rational B-Spline) surface
definition to describe the shape of a NURBS surface (before
any trimming). To mark the beginning of
a NURBS surface definition, use the \%\f3gluBeginSurface\fP command.
To mark the end of a NURBS surface definition, use the
\%\f3gluEndSurface\fP command. Call \%\f3gluNurbsSurface\fP within a NURBS
surface definition only.
.P
Positional, texture, and color coordinates are associated
with a surface by presenting each as a separate \%\f3gluNurbsSurface\fP between a
\%\f3gluBeginSurface\fP/\%\f3gluEndSurface\fP pair. No more than
one call to \%\f3gluNurbsSurface\fP for each of color, position, and texture
data can be made within a single \%\f3gluBeginSurface\fP/\%\f3gluEndSurface\fP
pair. Exactly one call must be made to describe the position of the
surface (a \f2type\fP of \%\f3GL_MAP2_VERTEX_3\fP or \%\f3GL_MAP2_VERTEX_4\fP).
.P
A NURBS surface can be trimmed by using the commands
\%\f3gluNurbsCurve\fP and \%\f3gluPwlCurve\fP between calls to
\%\f3gluBeginTrim\fP and \%\f3gluEndTrim\fP.
.P
Note that a \%\f3gluNurbsSurface\fP with \f2sKnotCount\fP knots in the \f2u\fP direction
and \f2tKnotCount\fP knots in the \f2v\fP direction with orders
\f2sOrder\fP and \f2tOrder\fP must have
(\f2sKnotCount\fP - \f2sOrder\fP) $times$ (\f2tKnotCount\fP - \f2tOrder\fP) control points.
.SH EXAMPLE
The following commands render a textured NURBS surface with normals;
the texture coordinates and normals are also NURBS surfaces:
.sp
.Ex
gluBeginSurface(nobj);
gluNurbsSurface(nobj, ..., GL_MAP2_TEXTURE_COORD_2);
gluNurbsSurface(nobj, ..., GL_MAP2_NORMAL);
gluNurbsSurface(nobj, ..., GL_MAP2_VERTEX_4);
gluEndSurface(nobj);
.Ee
.sp
.SH SEE ALSO
\%\f3gluBeginSurface(3G)\fP, \%\f3gluBeginTrim(3G)\fP, \%\f3gluNewNurbsRenderer(3G)\fP,
\%\f3gluNurbsCurve(3G)\fP,
\%\f3gluPwlCurve(3G)\fP