include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man2 / gluNurbsSurface.xml
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="gluNurbsSurface">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>gluNurbsSurface</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>gluNurbsSurface</refname>
17 <refpurpose>define the shape of a NURBS surface</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>gluNurbsSurface</function></funcdef>
23 <paramdef>GLUnurbs* <parameter>nurb</parameter></paramdef>
24 <paramdef>GLint <parameter>sKnotCount</parameter></paramdef>
25 <paramdef>GLfloat* <parameter>sKnots</parameter></paramdef>
26 <paramdef>GLint <parameter>tKnotCount</parameter></paramdef>
27 <paramdef>GLfloat* <parameter>tKnots</parameter></paramdef>
28 <paramdef>GLint <parameter>sStride</parameter></paramdef>
29 <paramdef>GLint <parameter>tStride</parameter></paramdef>
30 <paramdef>GLfloat* <parameter>control</parameter></paramdef>
31 <paramdef>GLint <parameter>sOrder</parameter></paramdef>
32 <paramdef>GLint <parameter>tOrder</parameter></paramdef>
33 <paramdef>GLenum <parameter>type</parameter></paramdef>
34 </funcprototype>
35 </funcsynopsis>
36 </refsynopsisdiv>
37 <!-- eqn: ignoring delim $$ -->
38 <refsect1 id="parameters"><title>Parameters</title>
39 <variablelist>
40 <varlistentry>
41 <term><parameter>nurb</parameter></term>
42 <listitem>
43 <para>
44 Specifies the NURBS object (created with <citerefentry><refentrytitle>gluNewNurbsRenderer</refentrytitle></citerefentry>).
45 </para>
46 </listitem>
47 </varlistentry>
48 <varlistentry>
49 <term><parameter>sKnotCount</parameter></term>
50 <listitem>
51 <para>
52 Specifies the number of knots in the parametric <emphasis>u</emphasis> direction.
53 </para>
54 </listitem>
55 </varlistentry>
56 <varlistentry>
57 <term><parameter>sKnots</parameter></term>
58 <listitem>
59 <para>
60 Specifies an array of <parameter>sKnotCount</parameter> nondecreasing knot values in the parametric
61 <emphasis>u</emphasis> direction.
62 </para>
63 </listitem>
64 </varlistentry>
65 <varlistentry>
66 <term><parameter>tKnotCount</parameter></term>
67 <listitem>
68 <para>
69 Specifies the number of knots in the parametric <emphasis>v</emphasis> direction.
70 </para>
71 </listitem>
72 </varlistentry>
73 <varlistentry>
74 <term><parameter>tKnots</parameter></term>
75 <listitem>
76 <para>
77 Specifies an array of <parameter>tKnotCount</parameter> nondecreasing knot values in the parametric
78 <emphasis>v</emphasis> direction.
79 </para>
80 </listitem>
81 </varlistentry>
82 <varlistentry>
83 <term><parameter>sStride</parameter></term>
84 <listitem>
85 <para>
86 Specifies the offset (as a number of single-precision floating-point values)
87 between successive control points in the parametric <emphasis>u</emphasis> direction
88 in <parameter>control</parameter>.
89 </para>
90 </listitem>
91 </varlistentry>
92 <varlistentry>
93 <term><parameter>tStride</parameter></term>
94 <listitem>
95 <para>
96 Specifies the offset (in single-precision floating-point values)
97 between successive control points in the parametric <emphasis>v</emphasis> direction
98 in <parameter>control</parameter>.
99 </para>
100 </listitem>
101 </varlistentry>
102 <varlistentry>
103 <term><parameter>control</parameter></term>
104 <listitem>
105 <para>
106 Specifies an array containing control points for the NURBS surface.
107 The offsets between successive control points in the parametric <emphasis>u</emphasis>
108 and <emphasis>v</emphasis> directions are given by <parameter>sStride</parameter> and <parameter>tStride</parameter>.
109 </para>
110 </listitem>
111 </varlistentry>
112 <varlistentry>
113 <term><parameter>sOrder</parameter></term>
114 <listitem>
115 <para>
116 Specifies the order of the NURBS surface in the parametric <emphasis>u</emphasis>
117 direction. The order is one more than the degree, hence
118 a surface that is cubic in <emphasis>u</emphasis> has a <emphasis>u</emphasis> order of 4.
119 </para>
120 </listitem>
121 </varlistentry>
122 <varlistentry>
123 <term><parameter>tOrder</parameter></term>
124 <listitem>
125 <para>
126 Specifies the order of the NURBS surface in the parametric <emphasis>v</emphasis>
127 direction. The order is one more than the degree, hence
128 a surface that is cubic in <emphasis>v</emphasis> has a <emphasis>v</emphasis> order of 4.
129 </para>
130 </listitem>
131 </varlistentry>
132 <varlistentry>
133 <term><parameter>type</parameter></term>
134 <listitem>
135 <para>
136 Specifies type of the surface. <parameter>type</parameter> can be any of the valid
137 two-dimensional evaluator types (such as <constant>GLU_MAP2_VERTEX_3</constant> or
138 <constant>GLU_MAP2_COLOR_4</constant>).
139 </para>
140 </listitem>
141 </varlistentry>
142 </variablelist>
143 </refsect1>
144 <refsect1 id="description"><title>Description</title>
145 <para>
146 Use <function>gluNurbsSurface</function> within a NURBS (Non-Uniform Rational B-Spline) surface
147 definition to describe the shape of a NURBS surface (before
148 any trimming). To mark the beginning of
149 a NURBS surface definition, use the <citerefentry><refentrytitle>gluBeginSurface</refentrytitle></citerefentry> command.
150 To mark the end of a NURBS surface definition, use the
151 <citerefentry><refentrytitle>gluEndSurface</refentrytitle></citerefentry> command. Call <function>gluNurbsSurface</function> within a NURBS
152 surface definition only.
153 </para>
154 <para>
155 Positional, texture, and color coordinates are associated
156 with a surface by presenting each as a separate <function>gluNurbsSurface</function> between a
157 <citerefentry><refentrytitle>gluBeginSurface</refentrytitle></citerefentry>/<citerefentry><refentrytitle>gluEndSurface</refentrytitle></citerefentry> pair. No more than
158 one call to <function>gluNurbsSurface</function> for each of color, position, and texture
159 data can be made within a single <citerefentry><refentrytitle>gluBeginSurface</refentrytitle></citerefentry>/<citerefentry><refentrytitle>gluEndSurface</refentrytitle></citerefentry>
160 pair. Exactly one call must be made to describe the position of the
161 surface (a <parameter>type</parameter> of <constant>GLU_MAP2_VERTEX_3</constant> or <constant>GLU_MAP2_VERTEX_4</constant>).
162 </para>
163 <para>
164 A NURBS surface can be trimmed by using the commands
165 <citerefentry><refentrytitle>gluNurbsCurve</refentrytitle></citerefentry> and <citerefentry><refentrytitle>gluPwlCurve</refentrytitle></citerefentry> between calls to
166 <citerefentry><refentrytitle>gluBeginTrim</refentrytitle></citerefentry> and <citerefentry><refentrytitle>gluEndTrim</refentrytitle></citerefentry>.
167 </para>
168 <para>
169 Note that a <function>gluNurbsSurface</function> with <parameter>sKnotCount</parameter> knots in the <emphasis>u</emphasis> direction
170 and <parameter>tKnotCount</parameter> knots in the <emphasis>v</emphasis> direction with orders
171 <parameter>sOrder</parameter> and <parameter>tOrder</parameter> must have
172 (<parameter>sKnotCount</parameter> - <parameter>sOrder</parameter>)
173 <inlineequation><mml:math><mml:mi mathvariant="italic">times</mml:mi></mml:math></inlineequation>
174 (<parameter>tKnotCount</parameter> - <parameter>tOrder</parameter>) control points.
175 </para>
176 </refsect1>
177 <refsect1 id="example"><title>Example</title>
178 <para>
179 The following commands render a textured NURBS surface with normals;
180 the texture coordinates and normals are also NURBS surfaces:
181 <programlisting>
182 gluBeginSurface(nobj);
183 gluNurbsSurface(nobj, ..., GL_MAP2_TEXTURE_COORD_2);
184 gluNurbsSurface(nobj, ..., GL_MAP2_NORMAL);
185 gluNurbsSurface(nobj, ..., GL_MAP2_VERTEX_4);
186 gluEndSurface(nobj);
187 </programlisting>
188 </para>
189 </refsect1>
190 <refsect1 id="seealso"><title>See Also</title>
191 <para>
192 <citerefentry><refentrytitle>gluBeginSurface</refentrytitle></citerefentry>,
193 <citerefentry><refentrytitle>gluBeginTrim</refentrytitle></citerefentry>,
194 <citerefentry><refentrytitle>gluNewNurbsRenderer</refentrytitle></citerefentry>,
195 <citerefentry><refentrytitle>gluNurbsCurve</refentrytitle></citerefentry>,
196 <citerefentry><refentrytitle>gluPwlCurve</refentrytitle></citerefentry>
197 </para>
198 </refsect1>
199 <refsect1 id="Copyright"><title>Copyright</title>
200 <para>
201 Copyright <trademark class="copyright"></trademark> 1991-2006
202 Silicon Graphics, Inc. This document is licensed under the SGI
203 Free Software B License. For details, see
204 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
205 </para>
206 </refsect1>
207 </refentry>