1GLUNURBSSURFACE(3G)                                        GLUNURBSSURFACE(3G)
2
3
4

NAME

6       gluNurbsSurface - define the shape of a NURBS surface
7
8

C SPECIFICATION

10       void gluNurbsSurface( GLUnurbs* nurb,
11                             GLint sKnotCount,
12                             GLfloat* sKnots,
13                             GLint tKnotCount,
14                             GLfloat* tKnots,
15                             GLint sStride,
16                             GLint tStride,
17                             GLfloat* control,
18                             GLint sOrder,
19                             GLint tOrder,
20                             GLenum type )
21
22

PARAMETERS

24       nurb        Specifies     the     NURBS     object     (created    with
25                   gluNewNurbsRenderer).
26
27       sKnotCount  Specifies the number of knots in the  parametric  u  direc‐
28                   tion.
29
30       sKnots      Specifies  an array of sKnotCount nondecreasing knot values
31                   in the parametric u direction.
32
33       tKnotCount  Specifies the number of knots in the  parametric  v  direc‐
34                   tion.
35
36       tKnots      Specifies  an array of tKnotCount nondecreasing knot values
37                   in the parametric v direction.
38
39       sStride     Specifies the  offset  (as  a  number  of  single-precision
40                   floating point values) between successive control points in
41                   the parametric u direction in control.
42
43       tStride     Specifies the offset  (in  single-precision  floating-point
44                   values) between successive control points in the parametric
45                   v direction in control.
46
47       control     Specifies an array containing control points for the  NURBS
48                   surface.   The offsets between successive control points in
49                   the parametric u and v directions are given by sStride  and
50                   tStride.
51
52       sOrder      Specifies  the order of the NURBS surface in the parametric
53                   u direction. The order is one more than the degree, hence a
54                   surface that is cubic in u has a u order of 4.
55
56       tOrder      Specifies  the order of the NURBS surface in the parametric
57                   v direction. The order is one more than the degree, hence a
58                   surface that is cubic in v has a v order of 4.
59
60       type        Specifies type of the surface. type can be any of the valid
61                   two-dimensional evaluator types (such  as  GL_MAP2_VERTEX_3
62                   or GL_MAP2_COLOR_4).
63

DESCRIPTION

65       Use gluNurbsSurface within a NURBS (Non-Uniform Rational B-Spline) sur‐
66       face definition to describe the shape of a NURBS  surface  (before  any
67       trimming). To mark the beginning of a NURBS surface definition, use the
68       gluBeginSurface command.  To mark the end of a  NURBS  surface  defini‐
69       tion,  use  the  gluEndSurface  command.  Call gluNurbsSurface within a
70       NURBS surface definition only.
71
72       Positional, texture, and color coordinates are associated with  a  sur‐
73       face  by  presenting  each  as  a  separate  gluNurbsSurface  between a
74       gluBeginSurface/gluEndSurface  pair.  No  more   than   one   call   to
75       gluNurbsSurface  for  each  of color, position, and texture data can be
76       made within a single gluBeginSurface/gluEndSurface  pair.  Exactly  one
77       call  must  be  made to describe the position of the surface (a type of
78       GL_MAP2_VERTEX_3 or GL_MAP2_VERTEX_4).
79
80       A NURBS surface can be trimmed by using the commands gluNurbsCurve  and
81       gluPwlCurve between calls to gluBeginTrim and gluEndTrim.
82
83       Note  that  a  gluNurbsSurface with sKnotCount knots in the u direction
84       and tKnotCount knots in the v direction with orders sOrder  and  tOrder
85       must have (sKnotCount - sOrder) × (tKnotCount - tOrder) control points.
86

EXAMPLE

88       The  following  commands  render a textured NURBS surface with normals;
89       the texture coordinates and normals are also NURBS surfaces:
90
91       gluBeginSurface(nobj);
92          gluNurbsSurface(nobj, ..., GL_MAP2_TEXTURE_COORD_2);
93          gluNurbsSurface(nobj, ..., GL_MAP2_NORMAL);
94          gluNurbsSurface(nobj, ..., GL_MAP2_VERTEX_4); gluEndSurface(nobj);
95
96

SEE ALSO

98       gluBeginSurface(3G),     gluBeginTrim(3G),     gluNewNurbsRenderer(3G),
99       gluNurbsCurve(3G), gluPwlCurve(3G)
100
101
102
103
104                                                           GLUNURBSSURFACE(3G)
Impressum