Opentk/Source/Bind/Specifications/Docs/gluNextContour.xml

168 lines
7.5 KiB
XML
Raw Normal View History

<?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="gluNextContour">
<refmeta>
<refmetainfo>
<copyright>
<year>1991-2006</year>
<holder>Silicon Graphics, Inc.</holder>
</copyright>
</refmetainfo>
<refentrytitle>gluNextContour</refentrytitle>
<manvolnum>3G</manvolnum>
</refmeta>
<refnamediv>
<refname>gluNextContour</refname>
<refpurpose>mark the beginning of another contour</refpurpose>
</refnamediv>
<refsynopsisdiv><title>C Specification</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>gluNextContour</function></funcdef>
<paramdef>GLUtesselator* <parameter>tess</parameter></paramdef>
<paramdef>GLenum <parameter>type</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<!-- eqn: ignoring delim $$ -->
<refsect1 id="parameters"><title>Parameters</title>
<variablelist>
<varlistentry>
<term><parameter>tess</parameter></term>
<listitem>
<para>
Specifies the tessellation object (created with <citerefentry><refentrytitle>gluNewTess</refentrytitle></citerefentry>).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>type</parameter></term>
<listitem>
<para>
Specifies the type of the contour being defined. Valid values are
<constant>GLU_EXTERIOR</constant>,
<constant>GLU_INTERIOR</constant>,
<constant>GLU_UNKNOWN</constant>,
<constant>GLU_CCW</constant>, and
<constant>GLU_CW</constant>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="description"><title>Description</title>
<para>
<function>gluNextContour</function> is used in describing polygons with multiple contours. After the first
contour has been described through a series of <citerefentry><refentrytitle>gluTessVertex</refentrytitle></citerefentry> calls,
a <function>gluNextContour</function> call indicates that the previous contour is complete and that the
next contour is about to begin.
Another series of <citerefentry><refentrytitle>gluTessVertex</refentrytitle></citerefentry> calls is then used to describe the new
contour. This process can be repeated until all contours have been described.
</para>
<para>
<parameter>type</parameter> defines what type of contour follows.
The legal contour types are as follows:
</para>
<variablelist>
<varlistentry>
<term><constant>GLU_EXTERIOR</constant></term>
<listitem>
<para>
An exterior contour defines an exterior boundary of the polygon.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GLU_INTERIOR</constant></term>
<listitem>
<para>
An interior contour defines an interior boundary of the polygon (such as
a hole).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GLU_UNKNOWN</constant></term>
<listitem>
<para>
An unknown contour is analyzed by the library to determine if it is interior
or exterior.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GLU_CCW</constant>, </term>
<listitem>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GLU_CW</constant></term>
<listitem>
<para>
The first <constant>GLU_CCW</constant> or <constant>GLU_CW</constant> contour defined is considered to
be exterior. All other contours are considered to be exterior if they
are oriented in the same direction (clockwise or counterclockwise) as
the first contour, and interior if they are not.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
If one contour is of type <constant>GLU_CCW</constant> or <constant>GLU_CW</constant>, then all
contours must be of the same type (if they are not, then all <constant>GLU_CCW</constant>
and <constant>GLU_CW</constant> contours will be changed to <constant>GLU_UNKNOWN</constant>).
</para>
<para>
Note that there is no real difference between the <constant>GLU_CCW</constant> and
<constant>GLU_CW</constant> contour types.
</para>
<para>
Before the first contour is described, <function>gluNextContour</function> can be called to
define the type of the first contour.
If <function>gluNextContour</function> is not called before the first contour, then the first contour is
marked <constant>GLU_EXTERIOR</constant>.
</para>
<para>
This command is obsolete and is provided for backward compatibility
only. Calls to <function>gluNextContour</function> are mapped to <citerefentry><refentrytitle>gluTessEndContour</refentrytitle></citerefentry>
followed by
<citerefentry><refentrytitle>gluTessBeginContour</refentrytitle></citerefentry>.
</para>
</refsect1>
<refsect1 id="example"><title>Example</title>
<para>
A quadrilateral with a triangular hole in it can be described as follows:
<programlisting>
gluBeginPolygon(tobj);
gluTessVertex(tobj, v1, v1);
gluTessVertex(tobj, v2, v2);
gluTessVertex(tobj, v3, v3);
gluTessVertex(tobj, v4, v4);
gluNextContour(tobj, GLU_INTERIOR);
gluTessVertex(tobj, v5, v5);
gluTessVertex(tobj, v6, v6);
gluTessVertex(tobj, v7, v7);
gluEndPolygon(tobj);
</programlisting>
</para>
</refsect1>
<refsect1 id="seealso"><title>See Also</title>
<para>
<citerefentry><refentrytitle>gluBeginPolygon</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>gluNewTess</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>gluTessBeginContour</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>gluTessCallback</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>gluTessVertex</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>