NAME
gluNurbsCurve
- define the shape of a NURBS curve
C SPECIFICATION
void gglluuNNuurrbbssCCuurrvvee(
GLUnurbs* _n_u_r_b,
GLint _k_n_o_t_C_o_u_n_t,
GLfloat _*_k_n_o_t_s,
GLint _s_t_r_i_d_e,
GLfloat _*_c_o_n_t_r_o_l,
GLint _o_r_d_e_r,
GLenum _t_y_p_e )
delim $$
PARAMETERS
-
_n_u_r_b
-
Specifies the NURBS object (created with gglluuNNeewwNNuurrbbssRReennddeerreerr).
-
_k_n_o_t_C_o_u_n_t
-
Specifies the number of knots in _k_n_o_t_s.
_k_n_o_t_C_o_u_n_t equals the number of control points plus the order.
-
_k_n_o_t_s
-
Specifies an array of _k_n_o_t_C_o_u_n_t nondecreasing knot values.
-
_s_t_r_i_d_e
-
Specifies the offset (as a number of single-precision floating-point values)
between successive curve control points.
-
_c_o_n_t_r_o_l
-
Specifies a pointer to an array of control points. The coordinates must
agree with _t_y_p_e, specified below.
-
_o_r_d_e_r
-
Specifies the order of the NURBS curve. _o_r_d_e_r equals degree + 1, hence
a cubic curve has an order of 4.
-
_t_y_p_e
-
Specifies the type of the curve. If this curve is defined within a
gglluuBBeeggiinnCCuurrvvee/gglluuEEnnddCCuurrvvee pair, then
the type can be any of the valid
one-dimensional evaluator types (such as GGLL__MMAAPP11__VVEERRTTEEXX__33 or
GGLL__MMAAPP11__CCOOLLOORR__44). Between a gglluuBBeeggiinnTTrriimm/gglluuEEnnddTTrriimm pair,
the only valid types are GGLLUU__MMAAPP11__TTRRIIMM__22 and GGLLUU__MMAAPP11__TTRRIIMM__33.
DESCRIPTION
Use gglluuNNuurrbbssCCuurrvvee to describe a NURBS curve.
When gglluuNNuurrbbssCCuurrvvee appears between a gglluuBBeeggiinnCCuurrvvee/gglluuEEnnddCCuurrvvee pair, it is
used to describe a curve to be rendered.
Positional, texture, and color coordinates are associated
by presenting each as a separate gglluuNNuurrbbssCCuurrvvee between a
gglluuBBeeggiinnCCuurrvvee/gglluuEEnnddCCuurrvvee pair. No more than
one call to gglluuNNuurrbbssCCuurrvvee for each of color, position, and texture
data can be made within a single gglluuBBeeggiinnCCuurrvvee/gglluuEEnnddCCuurrvvee
pair. Exactly one call must be made to describe the position of the
curve (a _t_y_p_e of GGLL__MMAAPP11__VVEERRTTEEXX__33 or GGLL__MMAAPP11__VVEERRTTEEXX__44).
When gglluuNNuurrbbssCCuurrvvee appears between a gglluuBBeeggiinnTTrriimm/gglluuEEnnddTTrriimm pair, it is
used to describe a trimming curve on a NURBS surface. If _t_y_p_e is
GGLLUU__MMAAPP11__TTRRIIMM__22, then it describes a curve in two-dimensional (_u
and _v)
parameter space. If it is GGLLUU__MMAAPP11__TTRRIIMM__33, then it describes a
curve in two-dimensional homogeneous (_u, _v, and _w)
parameter space.
See the gglluuBBeeggiinnTTrriimm reference 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, use gglluuPPwwllCCuurrvvee.
SEE ALSO
gglluuBBeeggiinnCCuurrvvee((33GG)), gglluuBBeeggiinnTTrriimm((33GG)), gglluuNNeewwNNuurrbbssRReennddeerreerr((33GG)), gglluuPPwwllCCuurrvvee((33GG))