Subversion Repositories AndroidProjects

Rev

Blame | Last modification | View Log | RSS feed

<?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="gluTessEndPolygon">
    <refmeta>
        <refmetainfo>
            <copyright>
                <year>1991-2006</year>
                <holder>Silicon Graphics, Inc.</holder>
            </copyright>
        </refmetainfo>
        <refentrytitle>gluTessEndPolygon</refentrytitle>
        <manvolnum>3G</manvolnum>
    </refmeta>
    <refnamediv>
        <refname>gluTessEndPolygon</refname>
        <refpurpose>delimit a polygon description</refpurpose>
    </refnamediv>
    <refsynopsisdiv><title>C Specification</title>
        <funcsynopsis>
            <funcprototype>
                <funcdef>void <function>gluTessEndPolygon</function></funcdef>
                <paramdef>GLUtesselator* <parameter>tess</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>
        </variablelist>
    </refsect1>
    <refsect1 id="description"><title>Description</title>
        <para>
            <citerefentry><refentrytitle>gluTessBeginPolygon</refentrytitle></citerefentry> and <function>gluTessEndPolygon</function> delimit the
            definition of a convex, concave, or self-intersecting polygon. Within
            each <citerefentry><refentrytitle>gluTessBeginPolygon</refentrytitle></citerefentry>/<function>gluTessEndPolygon</function> pair, there must be
            one or more calls to <citerefentry><refentrytitle>gluTessBeginContour</refentrytitle></citerefentry>/<citerefentry><refentrytitle>gluTessEndContour</refentrytitle></citerefentry>.
            Within each contour, there are zero or more calls to <citerefentry><refentrytitle>gluTessVertex</refentrytitle></citerefentry>.
            The vertices specify a closed contour (the last vertex of each contour
            is automatically linked to the first). See the <citerefentry><refentrytitle>gluTessVertex</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>gluTessBeginContour</refentrytitle></citerefentry>, and <citerefentry><refentrytitle>gluTessEndContour</refentrytitle></citerefentry> reference pages for
            more details.
        </para>
        <para>
            Once <function>gluTessEndPolygon</function> is called, the polygon is tessellated, and the
            resulting triangles are described through callbacks.
            See <citerefentry><refentrytitle>gluTessCallback</refentrytitle></citerefentry> for descriptions of the callback functions.
        </para>
    </refsect1>
    <refsect1 id="example"><title>Example</title>
        <para>
            A quadrilateral with a triangular hole in it can be described like this:
            <programlisting>
gluTessBeginPolygon(tobj, NULL);
   gluTessBeginContour(tobj);
      gluTessVertex(tobj, v1, v1);
      gluTessVertex(tobj, v2, v2);
      gluTessVertex(tobj, v3, v3);
      gluTessVertex(tobj, v4, v4);
   gluTessEndContour(tobj);
   gluTessBeginContour(tobj);
      gluTessVertex(tobj, v5, v5);
      gluTessVertex(tobj, v6, v6);
      gluTessVertex(tobj, v7, v7);
   gluTessEndContour(tobj);
gluTessEndPolygon(tobj);
            </programlisting>
            In the above example the pointers,
            <inlineequation><mml:math><mml:mi mathvariant="italic">v1</mml:mi></mml:math></inlineequation>
            through
            <inlineequation><mml:math><mml:mi mathvariant="italic">v7</mml:mi></mml:math></inlineequation>,
            should point to different
            addresses,
            since the values stored at these addresses will not be read by
            the tesselator until <function>gluTessEndPolygon</function> is called.
        </para>
    </refsect1>
    <refsect1 id="seealso"><title>See Also</title>
        <para>
            <citerefentry><refentrytitle>gluNewTess</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>gluTessBeginContour</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>gluTessBeginPolygon</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>gluTessCallback</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>gluTessNormal</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>gluTessProperty</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>