gluNurbsCurve
[New
- Windows 95, OEM Service Release 2]
The gluNurbsCurve function defines the shape of
a NURBS curve.
void gluNurbsCurve(
GLUnurbsObj * nobj, |
|
GLint nknots,
|
|
GLfloat * knot, |
|
GLint stride,
|
|
GLfloat * ctlarray, |
|
GLint order, |
|
GLenum type |
|
); |
|
Parameters
nobj
The NURBS
object (created with gluNewNurbsRenderer
nknots
The number of
knots in knot. The nknots parameter equals the number of control
points plus the order.
knot
An array of nknots
nondecreasing knot values.
stride
The offset
(as a number of single-precision floating-point values) between successive
curve control points.
ctlarray
A pointer to
an array of control points. The coordinates must agree with type.
order
The order of
the NURBS curve. The order parameter equals degree + 1; hence a cubic
curve has an order of 4.
type
The type of
the curve. If this curve is defined within a gluBeginCurve
Remarks
When gluNurbsCurve appears between a gluBeginCurve/gluEndCurve
pair, it describes a curve to be rendered. You associate positional, texture,
and color coordinates by presenting each as a separate gluNurbsCurve
between a gluBeginCurve/gluEndCurve pair. Do not make more than
one call to gluNurbsCurve for color, position, and texture data within a
single gluBeginCurve/gluEndCurve pair. Make exactly one call to
describe the position of the curve (a type of GL_MAP1_VERTEX_3 or
GL_MAP1_VERTEX_4).
When gluNurbsCurve appears between a gluBeginTrim
Example
The following
functions render a textured NURBS curve with normals:
gluBeginCurve(nobj);
gluNurbsCurve(nobj, ..., GL_MAP1_TEXTURE_COORD_2);
gluNurbsCurve(nobj,
..., GL_MAP1_NORMAL);
gluNurbsCurve(nobj, ..., GL_MAP1_VERTEX_4);
gluEndCurve(nobj);
See Also