gluNurbsSurface function

The gluNurbsSurface function defines the shape of a Non-Uniform Rational B-Spline (NURBS) surface.

Syntax

void WINAPI gluNurbsSurface(
   GLUnurbs *nobj,
   GLint    sknot_count,
   float    *sknot,
   GLint    tknot_count,
   GLfloat  *tknot,
   GLint    s_stride,
   GLint    t_stride,
   GLfloat  *ctlarray,
   GLint    sorder,
   GLint    torder,
   GLenum   type
);

Parameters

nobj

The NURBS object (created with gluNewNurbsRenderer).

sknot_count

The number of knots in the parametric u direction.

sknot

An array of sknot_count nondecreasing knot values in the parametric u direction.

tknot_count

The number of knots in the parametric v direction.

tknot

An array of tknot_count nondecreasing knot values in the parametric v direction.

s_stride

The offset (as a number of single precisionfloating-point values) between successive control points in the parametric u direction in ctlarray.

t_stride

The offset (in single precisionfloating-point values) between successive control points in the parametric v direction in ctlarray.

ctlarray

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_stride and t_stride.

sorder

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.

torder

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.

type

The type of the surface. The type parameter can be any of the valid two-dimensional evaluator types (such as GL_MAP2_VERTEX_3 or GL_MAP2_COLOR_4).

Return value

This function does not return a value.

Remarks

Use gluNurbsSurface within a NURBS surface definition to describe the shape of a NURBS surface (before any trimming). To mark the beginning of a NURBS surface definition, use the gluBeginSurface function. To mark the end of a NURBS surface definition, use the gluEndSurface function. Call gluNurbsSurface within a NURBS surface definition only.

You associate positional, texture, and color coordinates with a surface by presenting each as a separate gluNurbsSurface between a gluBeginSurface/gluEndSurface pair. Within a single gluBeginSurface/gluEndSurface pair, you can make only one call to gluNurbsSurface for color, position, and texture data. Make exactly one call to describe the position of the surface (a type of GL_MAP2_VERTEX_3 or GL_MAP2_VERTEX_4).

You can trim a NURBS surface by using the gluNurbsCurve and gluPwlCurve functions between calls to gluBeginTrim and gluEndTrim.

A gluNurbsSurface with sknot_count knots in the u direction and tknot_count knots in the v direction with orders sorder and torder must have (sknot_count -sorder) multipied by (tknot_count -torder) control points.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Glu.h
Library
Glu32.lib
DLL
Glu32.dll

See also

gluBeginSurface

gluBeginTrim

gluEndSurface

gluEndTrim

gluNewNurbsRenderer

gluNurbsCurve

gluPwlCurve