1GLUNURBSCURVE(3G) OpenGL Manual GLUNURBSCURVE(3G)
2
3
4
6 gluNurbsCurve - define the shape of a NURBS curve
7
9 void gluNurbsCurve(GLUnurbs* nurb, GLint knotCount, GLfloat * knots,
10 GLint stride, GLfloat * control, GLint order,
11 GLenum type);
12
14 nurb
15 Specifies the NURBS object (created with gluNewNurbsRenderer()).
16
17 knotCount
18 Specifies the number of knots in knots. knotCount equals the
19 number of control points plus the order.
20
21 knots
22 Specifies an array of knotCount nondecreasing knot values.
23
24 stride
25 Specifies the offset (as a number of single-precision
26 floating-point values) between successive curve control points.
27
28 control
29 Specifies a pointer to an array of control points. The coordinates
30 must agree with type, specified below.
31
32 order
33 Specifies the order of the NURBS curve. order equals degree + 1,
34 hence a cubic curve has an order of 4.
35
36 type
37 Specifies the type of the curve. If this curve is defined within a
38 gluBeginCurve()/gluEndCurve() pair, then the type can be any of the
39 valid one-dimensional evaluator types (such as GLU_MAP1_VERTEX_3 or
40 GLU_MAP1_COLOR_4). Between a gluBeginTrim()/gluEndTrim() pair, the
41 only valid types are GLU_MAP1_TRIM_2 and GLU_MAP1_TRIM_3.
42
44 Use gluNurbsCurve to describe a NURBS curve.
45
46 When gluNurbsCurve appears between a gluBeginCurve()/gluEndCurve()
47 pair, it is used to describe a curve to be rendered. Positional,
48 texture, and color coordinates are associated by presenting each as a
49 separate gluNurbsCurve between a gluBeginCurve()/gluEndCurve() pair. No
50 more than one call to gluNurbsCurve for each of color, position, and
51 texture data can be made within a single gluBeginCurve()/gluEndCurve()
52 pair. Exactly one call must be made to describe the position of the
53 curve (a type of GLU_MAP1_VERTEX_3 or GLU_MAP1_VERTEX_4).
54
55 When gluNurbsCurve appears between a gluBeginTrim()/gluEndTrim() pair,
56 it is used to describe a trimming curve on a NURBS surface. If type is
57 GLU_MAP1_TRIM_2, then it describes a curve in two-dimensional (u and v)
58 parameter space. If it is GLU_MAP1_TRIM_3, then it describes a curve in
59 two-dimensional homogeneous (u, v, and w) parameter space. See the
60 gluBeginTrim() reference page for more discussion about trimming
61 curves.
62
64 The following commands render a textured NURBS curve with normals:
65
66 gluBeginCurve(nobj);
67 gluNurbsCurve(nobj, ..., GL_MAP1_TEXTURE_COORD_2);
68 gluNurbsCurve(nobj, ..., GL_MAP1_NORMAL);
69 gluNurbsCurve(nobj, ..., GL_MAP1_VERTEX_4);
70 gluEndCurve(nobj);
71
72
73
75 To define trim curves that stitch well, use gluPwlCurve().
76
78 gluBeginCurve(), gluBeginTrim(), gluNewNurbsRenderer(), gluPwlCurve()
79
81 Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
82 under the SGI Free Software B License. For details, see
83 http://oss.sgi.com/projects/FreeB/.
84
86 opengl.org
87
88
89
90opengl.org 07/13/2018 GLUNURBSCURVE(3G)