Defines the shape of a non-uniform rational B-spline (NURBS) surface.
OpenGL C bindings library: libGL.a
void gluNurbsSurface(GLUnurbs* nurb, GLint sKnotCount, GLfloat *sKnots, GLint tKnotCount, GLfloat *tKnots, GLint sStride, GLint tStride, GLfloat *control, GLint sOrder, GLint tOrder, GLenum type)
The gluNurbsSurface subroutine is used within a NURBS surface definition to describe the shape of a NURBS surface before trimming. To mark the beginning and end of a NURBS surface definition, use the gluBeginSurface and gluEndSurface commands.
Note: Call the gluNurbsSurface subroutine within a NURBS surface definition only.
Positional, texture, and color coordinates are associated with a surface by presenting each as a separate gluNurbsSurface statement between a gluBeginSurface and gluEndSurface pair. Each gluBeginSurface and gluEndSurface pair can contain no more than one call to gluNurbsSurface for each color, position, and texture data. One (and only one) call must be made to describe the position of the surface. (The Type parameter must be either GL_MAP2_VERTEX_3 or GL_MAP2_VERTEX_4.)
A NURBS surface can be trimmed using the gluNurbsCurve and gluPwlCurve subroutines within calls to gluBeginTrim and gluEndTrim.
Note: A gluNurbsSurface with sKnotCount knots in the u direction and tKnotCount knots in the v direction with the sOrder and tOrder orders must have control points equal to (sKnotCount - sOrder) x (tKnotCount - tOrder).
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);
/usr/include/GL/gl.h | Contains C language constraints, variable type definitions, and ANSI function prototypes for OpenGL. |
The gluBeginSurface subroutine, gluBeginTrim subroutine, gluNewNurbsRenderer subroutine, gluNurbsCurve subroutine, gluPwlCurve subroutine.