mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-26 17:55:39 +00:00
164 lines
8.3 KiB
XML
164 lines
8.3 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="gluNurbsCurve">
|
|
<refmeta>
|
|
<refmetainfo>
|
|
<copyright>
|
|
<year>1991-2006</year>
|
|
<holder>Silicon Graphics, Inc.</holder>
|
|
</copyright>
|
|
</refmetainfo>
|
|
<refentrytitle>gluNurbsCurve</refentrytitle>
|
|
<manvolnum>3G</manvolnum>
|
|
</refmeta>
|
|
<refnamediv>
|
|
<refname>gluNurbsCurve</refname>
|
|
<refpurpose>define the shape of a NURBS curve</refpurpose>
|
|
</refnamediv>
|
|
<refsynopsisdiv><title>C Specification</title>
|
|
<funcsynopsis>
|
|
<funcprototype>
|
|
<funcdef>void <function>gluNurbsCurve</function></funcdef>
|
|
<paramdef>GLUnurbs* <parameter>nurb</parameter></paramdef>
|
|
<paramdef>GLint <parameter>knotCount</parameter></paramdef>
|
|
<paramdef>GLfloat * <parameter>knots</parameter></paramdef>
|
|
<paramdef>GLint <parameter>stride</parameter></paramdef>
|
|
<paramdef>GLfloat * <parameter>control</parameter></paramdef>
|
|
<paramdef>GLint <parameter>order</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>knotCount</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Specifies the number of knots in <parameter>knots</parameter>.
|
|
<parameter>knotCount</parameter> equals the number of control points plus the order.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>knots</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Specifies an array of <parameter>knotCount</parameter> nondecreasing knot values.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>stride</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Specifies the offset (as a number of single-precision floating-point values)
|
|
between successive curve control points.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>control</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Specifies a pointer to an array of control points. The coordinates must
|
|
agree with <parameter>type</parameter>, specified below.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>order</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Specifies the order of the NURBS curve. <parameter>order</parameter> equals degree + 1, hence
|
|
a cubic curve has an order of 4.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>type</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Specifies the type of the curve. If this curve is defined within a
|
|
<citerefentry><refentrytitle>gluBeginCurve</refentrytitle></citerefentry>/<citerefentry><refentrytitle>gluEndCurve</refentrytitle></citerefentry> pair, then
|
|
the type can be any of the valid
|
|
one-dimensional evaluator types (such as <constant>GLU_MAP1_VERTEX_3</constant> or
|
|
<constant>GLU_MAP1_COLOR_4</constant>). Between a <citerefentry><refentrytitle>gluBeginTrim</refentrytitle></citerefentry>/<citerefentry><refentrytitle>gluEndTrim</refentrytitle></citerefentry> pair,
|
|
the only valid types are <constant>GLU_MAP1_TRIM_2</constant> and <constant>GLU_MAP1_TRIM_3</constant>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
<refsect1 id="description"><title>Description</title>
|
|
<para>
|
|
Use <function>gluNurbsCurve</function> to describe a NURBS curve.
|
|
</para>
|
|
<para>
|
|
When <function>gluNurbsCurve</function> appears between a <citerefentry><refentrytitle>gluBeginCurve</refentrytitle></citerefentry>/<citerefentry><refentrytitle>gluEndCurve</refentrytitle></citerefentry> pair, it is
|
|
used to describe a curve to be rendered.
|
|
Positional, texture, and color coordinates are associated
|
|
by presenting each as a separate <function>gluNurbsCurve</function> between a
|
|
<citerefentry><refentrytitle>gluBeginCurve</refentrytitle></citerefentry>/<citerefentry><refentrytitle>gluEndCurve</refentrytitle></citerefentry> pair. No more than
|
|
one call to <function>gluNurbsCurve</function> for each of color, position, and texture
|
|
data can be made within a single <citerefentry><refentrytitle>gluBeginCurve</refentrytitle></citerefentry>/<citerefentry><refentrytitle>gluEndCurve</refentrytitle></citerefentry>
|
|
pair. Exactly one call must be made to describe the position of the
|
|
curve (a <parameter>type</parameter> of <constant>GLU_MAP1_VERTEX_3</constant> or <constant>GLU_MAP1_VERTEX_4</constant>).
|
|
</para>
|
|
<para>
|
|
When <function>gluNurbsCurve</function> appears between a <citerefentry><refentrytitle>gluBeginTrim</refentrytitle></citerefentry>/<citerefentry><refentrytitle>gluEndTrim</refentrytitle></citerefentry> pair, it is
|
|
used to describe a trimming curve on a NURBS surface. If <parameter>type</parameter> is
|
|
<constant>GLU_MAP1_TRIM_2</constant>, then it describes a curve in two-dimensional (<emphasis>u</emphasis>
|
|
and <emphasis>v</emphasis>)
|
|
parameter space. If it is <constant>GLU_MAP1_TRIM_3</constant>, then it describes a
|
|
curve in two-dimensional homogeneous (<emphasis>u</emphasis>, <emphasis>v</emphasis>, and <emphasis>w</emphasis>)
|
|
parameter space.
|
|
See the <citerefentry><refentrytitle>gluBeginTrim</refentrytitle></citerefentry> reference page for more discussion about trimming
|
|
curves.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 id="example"><title>Example</title>
|
|
<para>
|
|
The following commands render a textured NURBS curve with normals:
|
|
<programlisting>
|
|
gluBeginCurve(nobj);
|
|
gluNurbsCurve(nobj, ..., GL_MAP1_TEXTURE_COORD_2);
|
|
gluNurbsCurve(nobj, ..., GL_MAP1_NORMAL);
|
|
gluNurbsCurve(nobj, ..., GL_MAP1_VERTEX_4);
|
|
gluEndCurve(nobj);
|
|
</programlisting>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 id="notes"><title>Notes</title>
|
|
<para>
|
|
To define trim curves that stitch well, use <citerefentry><refentrytitle>gluPwlCurve</refentrytitle></citerefentry>.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 id="seealso"><title>See Also</title>
|
|
<para>
|
|
<citerefentry><refentrytitle>gluBeginCurve</refentrytitle></citerefentry>,
|
|
<citerefentry><refentrytitle>gluBeginTrim</refentrytitle></citerefentry>,
|
|
<citerefentry><refentrytitle>gluNewNurbsRenderer</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>
|