NAME
gluNurbsSurface
- define the shape of a NURBS surface
C SPECIFICATION
void gglluuNNuurrbbssSSuurrffaaccee(
GLUnurbs* _n_u_r_b,
GLint _s_K_n_o_t_C_o_u_n_t,
GLfloat* _s_K_n_o_t_s,
GLint _t_K_n_o_t_C_o_u_n_t,
GLfloat* _t_K_n_o_t_s,
GLint _s_S_t_r_i_d_e,
GLint _t_S_t_r_i_d_e,
GLfloat* _c_o_n_t_r_o_l,
GLint _s_O_r_d_e_r,
GLint _t_O_r_d_e_r,
GLenum _t_y_p_e )
delim $$
PARAMETERS
-
_n_u_r_b
-
Specifies the NURBS object (created with gglluuNNeewwNNuurrbbssRReennddeerreerr).
-
_s_K_n_o_t_C_o_u_n_t
-
Specifies the number of knots in the parametric _u direction.
-
_s_K_n_o_t_s
-
Specifies an array of _s_K_n_o_t_C_o_u_n_t nondecreasing knot values in the parametric
_u direction.
-
_t_K_n_o_t_C_o_u_n_t
-
Specifies the number of knots in the parametric _v direction.
-
_t_K_n_o_t_s
-
Specifies an array of _t_K_n_o_t_C_o_u_n_t nondecreasing knot values in the parametric
_v direction.
-
_s_S_t_r_i_d_e
-
Specifies the offset (as a number of single-precision floating point values)
between successive control points in the parametric _u direction
in _c_o_n_t_r_o_l.
-
_t_S_t_r_i_d_e
-
Specifies the offset (in single-precision floating-point values)
between successive control points in the parametric _v direction
in _c_o_n_t_r_o_l.
-
_c_o_n_t_r_o_l
-
Specifies an array containing control points for the NURBS surface.
The offsets between successive control points in the parametric _u
and _v directions are given by _s_S_t_r_i_d_e and _t_S_t_r_i_d_e.
-
_s_O_r_d_e_r
-
Specifies the order of the NURBS surface in the parametric _u
direction. The order is one more than the degree, hence
a surface that is cubic in _u has a _u order of 4.
-
_t_O_r_d_e_r
-
Specifies the order of the NURBS surface in the parametric _v
direction. The order is one more than the degree, hence
a surface that is cubic in _v has a _v order of 4.
-
_t_y_p_e
-
Specifies type of the surface. _t_y_p_e can be any of the valid
two-dimensional evaluator types (such as GGLL__MMAAPP22__VVEERRTTEEXX__33 or
GGLL__MMAAPP22__CCOOLLOORR__44).
DESCRIPTION
Use gglluuNNuurrbbssSSuurrffaaccee 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 gglluuBBeeggiinnSSuurrffaaccee command.
To mark the end of a NURBS surface definition, use the
gglluuEEnnddSSuurrffaaccee command. Call gglluuNNuurrbbssSSuurrffaaccee within a NURBS
surface definition only.
Positional, texture, and color coordinates are associated
with a surface by presenting each as a separate gglluuNNuurrbbssSSuurrffaaccee between a
gglluuBBeeggiinnSSuurrffaaccee/gglluuEEnnddSSuurrffaaccee pair. No more than
one call to gglluuNNuurrbbssSSuurrffaaccee for each of color, position, and texture
data can be made within a single gglluuBBeeggiinnSSuurrffaaccee/gglluuEEnnddSSuurrffaaccee
pair. Exactly one call must be made to describe the position of the
surface (a _t_y_p_e of GGLL__MMAAPP22__VVEERRTTEEXX__33 or GGLL__MMAAPP22__VVEERRTTEEXX__44).
A NURBS surface can be trimmed by using the commands
gglluuNNuurrbbssCCuurrvvee and gglluuPPwwllCCuurrvvee between calls to
gglluuBBeeggiinnTTrriimm and gglluuEEnnddTTrriimm.
Note that a gglluuNNuurrbbssSSuurrffaaccee with _s_K_n_o_t_C_o_u_n_t knots in the _u direction
and _t_K_n_o_t_C_o_u_n_t knots in the _v direction with orders
_s_O_r_d_e_r and _t_O_r_d_e_r must have
(_s_K_n_o_t_C_o_u_n_t - _s_O_r_d_e_r) $times$ (_t_K_n_o_t_C_o_u_n_t - _t_O_r_d_e_r) control points.
EXAMPLE
The following commands render a textured NURBS surface with normals;
the texture coordinates and normals are also NURBS surfaces:
gluBeginSurface(nobj);
gluNurbsSurface(nobj, ..., GL_MAP2_TEXTURE_COORD_2);
gluNurbsSurface(nobj, ..., GL_MAP2_NORMAL);
gluNurbsSurface(nobj, ..., GL_MAP2_VERTEX_4);
gluEndSurface(nobj);
SEE ALSO
gglluuBBeeggiinnSSuurrffaaccee((33GG)), gglluuBBeeggiinnTTrriimm((33GG)), gglluuNNeewwNNuurrbbssRReennddeerreerr((33GG)),
gglluuNNuurrbbssCCuurrvvee((33GG)),
gglluuPPwwllCCuurrvvee((33GG))