gluNurbsCurve(3) gluNurbsCurve(3)

## NAME

gluNurbsCurve- define the shape of a NURBS curve

## C SPECIFICATION

voidgluNurbsCurve( GLUnurbs*nurb, GLintknotCount, GLfloat*knots, GLintstride, GLfloat*control, GLintorder, GLenumtype)

## PARAMETERS

nurbSpecifies the NURBS object (created withgluNewNurbsRenderer).knotCountSpecifies the number of knots inknots.knotCountequals the number of control points plus the order.knotsSpecifies an array ofknotCountnondecreasing knot values.strideSpecifies the offset (as a number of single-precision float- ing-point values) between successive curve control points.controlSpecifies a pointer to an array of control points. The coor- dinates must agree withtype, specified below.orderSpecifies the order of the NURBS curve.orderequals degree + 1, hence a cubic curve has an order of 4.typeSpecifies the type of the curve. If this curve is defined within agluBeginCurve/gluEndCurvepair, then the type can be any of the valid one-dimensional evaluator types (such asGL_MAP1_VERTEX_3orGL_MAP1_COLOR_4). Between agluBeginTrim/gluEndTrimpair, the only valid types areGLU_MAP1_TRIM_2andGLU_MAP1_TRIM_3.

## DESCRIPTION

UsegluNurbsCurveto describe a NURBS curve. WhengluNurbsCurveappears between agluBeginCurve/gluEndCurvepair, it is used to describe a curve to be rendered. Positional, texture, and color coordinates are associated by presenting each as a separategluNurbsCurvebetween agluBeginCurve/gluEndCurvepair. No more than one call togluNurbsCurvefor each of color, position, and texture data can be made within a singlegluBeginCurve/gluEndCurvepair. Exactly one call must be made to describe the position of the curve (atypeofGL_MAP1_VERTEX_3orGL_MAP1_VERTEX_4). WhengluNurbsCurveappears between agluBeginTrim/gluEndTrimpair, it is used to describe a trimming curve on a NURBS surface. IftypeisGLU_MAP1_TRIM_2, then it describes a curve in two-dimensional (uandv) parameter space. If it isGLU_MAP1_TRIM_3, then it describes a curve in two-dimensional homogeneous (u,v, andw) parameter space. See thegluBeginTrimreference page for more discussion about trimming curves.

## EXAMPLE

The following commands 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);

## NOTES

To define trim curves which stitch well, usegluPwlCurve.

## SEE ALSO

gluBeginCurve(3),gluBeginTrim(3),gluNewNurbsRenderer(3),gluPwlCurve(3)gluNurbsCurve(3)

Mac OS X 10.6 - Generated Thu Sep 17 20:20:34 CDT 2009