Tao.OpenGl SDK Documentation

Glu.gluNurbsSurface Method (GLUnurbs, Int32, Single[], Int32, Single[], Int32, Int32, Single[], Int32, Int32, Int32)

Defines the shape of a NURBS surface.

[Visual Basic]
Overloads Public Shared Sub gluNurbsSurface( _
   ByVal nurb As GLUnurbs, _
   ByVal sKnotCount As Integer, _
   ByVal sKnots As Single(), _
   ByVal tKnotCount As Integer, _
   ByVal tKnots As Single(), _
   ByVal sStride As Integer, _
   ByVal tStride As Integer, _
   ByVal control As Single(), _
   ByVal sOrder As Integer, _
   ByVal tOrder As Integer, _
   ByVal type As Integer _
)
[C#]
public static void gluNurbsSurface(
   GLUnurbs nurb,
   int sKnotCount,
   float[] sKnots,
   int tKnotCount,
   float[] tKnots,
   int sStride,
   int tStride,
   float[] control,
   int sOrder,
   int tOrder,
   int type
);

Parameters

nurb
The NURBS object (created with gluNewNurbsRenderer).
sKnotCount
The number of knots in the parametric u direction.
sKnots
An array of sKnotCount nondecreasing knot values in the parametric u direction
tKnotCount
The number of knots in the parametric v direction.
tKnots
An array of tKnotCount nondecreasing knot values in the parametric v direction.
sStride
The offset (as a number of single precision?–floating-point values) between successive control points in the parametric u direction in control.
tStride
The offset (in single precision?–floating-point values) between successive control points in the parametric v direction in control.
control
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 sStride and tStride.
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-dimensonal evaluator types (such as GL_MAP2_VERTEX_3 or GL_MAP2_COLOR_4).

Remarks

Use gluNurbsSurface 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 gluBeginSurface command. To mark the end of a NURBS surface definition, use the gluEndSurface command. Call gluNurbsSurface within a NURBS surface definition only.

Positional, texture, and color coordinates are associated with a surface by presenting each as a separate gluNurbsSurface between a gluBeginSurface/gluEndSurface pair. No more than one call to gluNurbsSurface for each of color, position, and texture data can be made within a single gluBeginSurface/gluEndSurface pair. Exactly one call must be made to describe the position of the surface (a type of GL_MAP2_VERTEX_3 or GL_MAP2_VERTEX_4).

A NURBS surface can be trimmed by using the commands gluNurbsCurve and gluPwlCurve between calls to gluBeginTrim and gluEndTrim.

Note that a gluNurbsSurface with sKnotCount knots in the u direction and tKnotCount knots in the v direction with orders sOrder and tOrder must have (sKnotCount - sOrder) multiplied by (tKnotCount - tOrder) control points.

EXAMPLE

            Glu.gluBeginSurface(nobj);
            Glu.gluNurbsSurface(nobj, . . ., Gl.GL_MAP2_TEXTURE_COORD_2);
            Glu.gluNurbsSurface(nobj, . . ., Gl.GL_MAP2_NORMAL);
            Glu.gluNurbsSurface(nobj, . . ., Gl.GL_MAP2_VERTEX_4);
            Glu.gluEndSurface(nobj);
            

See Also

Glu Class | Tao.OpenGl Namespace | Glu.gluNurbsSurface Overload List | gluBeginSurface | gluBeginTrim | gluEndSurface | gluEndTrim | gluNewNurbsRenderer | gluNurbsCurve | gluPwlCurve