Opentk/Source/Bind/Specifications/Docs/gluNurbsSurface.xml
2009-03-08 00:46:58 +00:00

207 lines
10 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
<refentry id="gluNurbsSurface">
<refmeta>
<refmetainfo>
<copyright>
<year>1991-2006</year>
<holder>Silicon Graphics, Inc.</holder>
</copyright>
</refmetainfo>
<refentrytitle>gluNurbsSurface</refentrytitle>
<manvolnum>3G</manvolnum>
</refmeta>
<refnamediv>
<refname>gluNurbsSurface</refname>
<refpurpose>define the shape of a NURBS surface</refpurpose>
</refnamediv>
<refsynopsisdiv><title>C Specification</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>gluNurbsSurface</function></funcdef>
<paramdef>GLUnurbs* <parameter>nurb</parameter></paramdef>
<paramdef>GLint <parameter>sKnotCount</parameter></paramdef>
<paramdef>GLfloat* <parameter>sKnots</parameter></paramdef>
<paramdef>GLint <parameter>tKnotCount</parameter></paramdef>
<paramdef>GLfloat* <parameter>tKnots</parameter></paramdef>
<paramdef>GLint <parameter>sStride</parameter></paramdef>
<paramdef>GLint <parameter>tStride</parameter></paramdef>
<paramdef>GLfloat* <parameter>control</parameter></paramdef>
<paramdef>GLint <parameter>sOrder</parameter></paramdef>
<paramdef>GLint <parameter>tOrder</parameter></paramdef>
<paramdef>GLenum <parameter>type</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<!-- eqn: ignoring delim $$ -->
<refsect1 id="parameters"><title>Parameters</title>
<variablelist>
<varlistentry>
<term><parameter>nurb</parameter></term>
<listitem>
<para>
Specifies the NURBS object (created with <citerefentry><refentrytitle>gluNewNurbsRenderer</refentrytitle></citerefentry>).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>sKnotCount</parameter></term>
<listitem>
<para>
Specifies the number of knots in the parametric <emphasis>u</emphasis> direction.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>sKnots</parameter></term>
<listitem>
<para>
Specifies an array of <parameter>sKnotCount</parameter> nondecreasing knot values in the parametric
<emphasis>u</emphasis> direction.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>tKnotCount</parameter></term>
<listitem>
<para>
Specifies the number of knots in the parametric <emphasis>v</emphasis> direction.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>tKnots</parameter></term>
<listitem>
<para>
Specifies an array of <parameter>tKnotCount</parameter> nondecreasing knot values in the parametric
<emphasis>v</emphasis> direction.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>sStride</parameter></term>
<listitem>
<para>
Specifies the offset (as a number of single-precision floating-point values)
between successive control points in the parametric <emphasis>u</emphasis> direction
in <parameter>control</parameter>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>tStride</parameter></term>
<listitem>
<para>
Specifies the offset (in single-precision floating-point values)
between successive control points in the parametric <emphasis>v</emphasis> direction
in <parameter>control</parameter>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>control</parameter></term>
<listitem>
<para>
Specifies an array containing control points for the NURBS surface.
The offsets between successive control points in the parametric <emphasis>u</emphasis>
and <emphasis>v</emphasis> directions are given by <parameter>sStride</parameter> and <parameter>tStride</parameter>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>sOrder</parameter></term>
<listitem>
<para>
Specifies the order of the NURBS surface in the parametric <emphasis>u</emphasis>
direction. The order is one more than the degree, hence
a surface that is cubic in <emphasis>u</emphasis> has a <emphasis>u</emphasis> order of 4.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>tOrder</parameter></term>
<listitem>
<para>
Specifies the order of the NURBS surface in the parametric <emphasis>v</emphasis>
direction. The order is one more than the degree, hence
a surface that is cubic in <emphasis>v</emphasis> has a <emphasis>v</emphasis> order of 4.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>type</parameter></term>
<listitem>
<para>
Specifies type of the surface. <parameter>type</parameter> can be any of the valid
two-dimensional evaluator types (such as <constant>GLU_MAP2_VERTEX_3</constant> or
<constant>GLU_MAP2_COLOR_4</constant>).
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="description"><title>Description</title>
<para>
Use <function>gluNurbsSurface</function> 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 <citerefentry><refentrytitle>gluBeginSurface</refentrytitle></citerefentry> command.
To mark the end of a NURBS surface definition, use the
<citerefentry><refentrytitle>gluEndSurface</refentrytitle></citerefentry> command. Call <function>gluNurbsSurface</function> within a NURBS
surface definition only.
</para>
<para>
Positional, texture, and color coordinates are associated
with a surface by presenting each as a separate <function>gluNurbsSurface</function> between a
<citerefentry><refentrytitle>gluBeginSurface</refentrytitle></citerefentry>/<citerefentry><refentrytitle>gluEndSurface</refentrytitle></citerefentry> pair. No more than
one call to <function>gluNurbsSurface</function> for each of color, position, and texture
data can be made within a single <citerefentry><refentrytitle>gluBeginSurface</refentrytitle></citerefentry>/<citerefentry><refentrytitle>gluEndSurface</refentrytitle></citerefentry>
pair. Exactly one call must be made to describe the position of the
surface (a <parameter>type</parameter> of <constant>GLU_MAP2_VERTEX_3</constant> or <constant>GLU_MAP2_VERTEX_4</constant>).
</para>
<para>
A NURBS surface can be trimmed by using the commands
<citerefentry><refentrytitle>gluNurbsCurve</refentrytitle></citerefentry> and <citerefentry><refentrytitle>gluPwlCurve</refentrytitle></citerefentry> between calls to
<citerefentry><refentrytitle>gluBeginTrim</refentrytitle></citerefentry> and <citerefentry><refentrytitle>gluEndTrim</refentrytitle></citerefentry>.
</para>
<para>
Note that a <function>gluNurbsSurface</function> with <parameter>sKnotCount</parameter> knots in the <emphasis>u</emphasis> direction
and <parameter>tKnotCount</parameter> knots in the <emphasis>v</emphasis> direction with orders
<parameter>sOrder</parameter> and <parameter>tOrder</parameter> must have
(<parameter>sKnotCount</parameter> - <parameter>sOrder</parameter>)
<inlineequation><mml:math><mml:mi mathvariant="italic">times</mml:mi></mml:math></inlineequation>
(<parameter>tKnotCount</parameter> - <parameter>tOrder</parameter>) control points.
</para>
</refsect1>
<refsect1 id="example"><title>Example</title>
<para>
The following commands render a textured NURBS surface with normals;
the texture coordinates and normals are also NURBS surfaces:
<programlisting>
gluBeginSurface(nobj);
gluNurbsSurface(nobj, ..., GL_MAP2_TEXTURE_COORD_2);
gluNurbsSurface(nobj, ..., GL_MAP2_NORMAL);
gluNurbsSurface(nobj, ..., GL_MAP2_VERTEX_4);
gluEndSurface(nobj);
</programlisting>
</para>
</refsect1>
<refsect1 id="seealso"><title>See Also</title>
<para>
<citerefentry><refentrytitle>gluBeginSurface</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>gluBeginTrim</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>gluNewNurbsRenderer</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>gluNurbsCurve</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>gluPwlCurve</refentrytitle></citerefentry>
</para>
</refsect1>
<refsect1 id="Copyright"><title>Copyright</title>
<para>
Copyright <trademark class="copyright"></trademark> 1991-2006
Silicon Graphics, Inc. This document is licensed under the SGI
Free Software B License. For details, see
<ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
</para>
</refsect1>
</refentry>