Defines the shape of a non-uniform rational B-spline (NURBS) surface.
OpenGL C bindings library: libGL.a
void gluNurbsSurface(GLUnurbsObj *nobj, GLint UKnotCount, GLfloat *UKnotArray, GLint VKnotCount, GLfloat *VKnotArray, GLint UStride, GLint VStride, GLfloat *ControlArray, GLint UOrder, GLint VOrder, 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 UKnotCount knots in the U direction and VKnotCount knots in the V direction with the UOrder and VOrder orders must have control points equal to (UKnotCount - UOrder) x (VKnotCount - VOrder).
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.