1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE book PUBLIC
"-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id=
"gluNurbsCurve">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>gluNurbsCurve
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>gluNurbsCurve
</refname>
17 <refpurpose>define the shape of a NURBS curve
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>gluNurbsCurve
</function></funcdef>
23 <paramdef>GLUnurbs*
<parameter>nurb
</parameter></paramdef>
24 <paramdef>GLint
<parameter>knotCount
</parameter></paramdef>
25 <paramdef>GLfloat *
<parameter>knots
</parameter></paramdef>
26 <paramdef>GLint
<parameter>stride
</parameter></paramdef>
27 <paramdef>GLfloat *
<parameter>control
</parameter></paramdef>
28 <paramdef>GLint
<parameter>order
</parameter></paramdef>
29 <paramdef>GLenum
<parameter>type
</parameter></paramdef>
33 <!-- eqn: ignoring delim $$ -->
34 <refsect1 id=
"parameters"><title>Parameters
</title>
37 <term><parameter>nurb
</parameter></term>
40 Specifies the NURBS object (created with
<citerefentry><refentrytitle>gluNewNurbsRenderer
</refentrytitle></citerefentry>).
45 <term><parameter>knotCount
</parameter></term>
48 Specifies the number of knots in
<parameter>knots
</parameter>.
49 <parameter>knotCount
</parameter> equals the number of control points plus the order.
54 <term><parameter>knots
</parameter></term>
57 Specifies an array of
<parameter>knotCount
</parameter> nondecreasing knot values.
62 <term><parameter>stride
</parameter></term>
65 Specifies the offset (as a number of single-precision floating-point values)
66 between successive curve control points.
71 <term><parameter>control
</parameter></term>
74 Specifies a pointer to an array of control points. The coordinates must
75 agree with
<parameter>type
</parameter>, specified below.
80 <term><parameter>order
</parameter></term>
83 Specifies the order of the NURBS curve.
<parameter>order
</parameter> equals degree +
1, hence
84 a cubic curve has an order of
4.
89 <term><parameter>type
</parameter></term>
92 Specifies the type of the curve. If this curve is defined within a
93 <citerefentry><refentrytitle>gluBeginCurve
</refentrytitle></citerefentry>/
<citerefentry><refentrytitle>gluEndCurve
</refentrytitle></citerefentry> pair, then
94 the type can be any of the valid
95 one-dimensional evaluator types (such as
<constant>GLU_MAP1_VERTEX_3
</constant> or
96 <constant>GLU_MAP1_COLOR_4
</constant>). Between a
<citerefentry><refentrytitle>gluBeginTrim
</refentrytitle></citerefentry>/
<citerefentry><refentrytitle>gluEndTrim
</refentrytitle></citerefentry> pair,
97 the only valid types are
<constant>GLU_MAP1_TRIM_2
</constant> and
<constant>GLU_MAP1_TRIM_3
</constant>.
103 <refsect1 id=
"description"><title>Description
</title>
105 Use
<function>gluNurbsCurve
</function> to describe a NURBS curve.
108 When
<function>gluNurbsCurve
</function> appears between a
<citerefentry><refentrytitle>gluBeginCurve
</refentrytitle></citerefentry>/
<citerefentry><refentrytitle>gluEndCurve
</refentrytitle></citerefentry> pair, it is
109 used to describe a curve to be rendered.
110 Positional, texture, and color coordinates are associated
111 by presenting each as a separate
<function>gluNurbsCurve
</function> between a
112 <citerefentry><refentrytitle>gluBeginCurve
</refentrytitle></citerefentry>/
<citerefentry><refentrytitle>gluEndCurve
</refentrytitle></citerefentry> pair. No more than
113 one call to
<function>gluNurbsCurve
</function> for each of color, position, and texture
114 data can be made within a single
<citerefentry><refentrytitle>gluBeginCurve
</refentrytitle></citerefentry>/
<citerefentry><refentrytitle>gluEndCurve
</refentrytitle></citerefentry>
115 pair. Exactly one call must be made to describe the position of the
116 curve (a
<parameter>type
</parameter> of
<constant>GLU_MAP1_VERTEX_3
</constant> or
<constant>GLU_MAP1_VERTEX_4
</constant>).
119 When
<function>gluNurbsCurve
</function> appears between a
<citerefentry><refentrytitle>gluBeginTrim
</refentrytitle></citerefentry>/
<citerefentry><refentrytitle>gluEndTrim
</refentrytitle></citerefentry> pair, it is
120 used to describe a trimming curve on a NURBS surface. If
<parameter>type
</parameter> is
121 <constant>GLU_MAP1_TRIM_2
</constant>, then it describes a curve in two-dimensional (
<emphasis>u
</emphasis>
122 and
<emphasis>v
</emphasis>)
123 parameter space. If it is
<constant>GLU_MAP1_TRIM_3
</constant>, then it describes a
124 curve in two-dimensional homogeneous (
<emphasis>u
</emphasis>,
<emphasis>v
</emphasis>, and
<emphasis>w
</emphasis>)
126 See the
<citerefentry><refentrytitle>gluBeginTrim
</refentrytitle></citerefentry> reference page for more discussion about trimming
130 <refsect1 id=
"example"><title>Example
</title>
132 The following commands render a textured NURBS curve with normals:
135 gluNurbsCurve(nobj, ..., GL_MAP1_TEXTURE_COORD_2);
136 gluNurbsCurve(nobj, ..., GL_MAP1_NORMAL);
137 gluNurbsCurve(nobj, ..., GL_MAP1_VERTEX_4);
142 <refsect1 id=
"notes"><title>Notes
</title>
144 To define trim curves that stitch well, use
<citerefentry><refentrytitle>gluPwlCurve
</refentrytitle></citerefentry>.
147 <refsect1 id=
"seealso"><title>See Also
</title>
149 <citerefentry><refentrytitle>gluBeginCurve
</refentrytitle></citerefentry>,
150 <citerefentry><refentrytitle>gluBeginTrim
</refentrytitle></citerefentry>,
151 <citerefentry><refentrytitle>gluNewNurbsRenderer
</refentrytitle></citerefentry>,
152 <citerefentry><refentrytitle>gluPwlCurve
</refentrytitle></citerefentry>
155 <refsect1 id=
"Copyright"><title>Copyright
</title>
157 Copyright
<trademark class=
"copyright"></trademark> 1991-
2006
158 Silicon Graphics, Inc. This document is licensed under the SGI
159 Free Software B License. For details, see
160 <ulink url=
"http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/
</ulink>.