Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1452 | chris | 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="gluTessEndPolygon"> |
||
| 5 | <refmeta> |
||
| 6 | <refmetainfo> |
||
| 7 | <copyright> |
||
| 8 | <year>1991-2006</year> |
||
| 9 | <holder>Silicon Graphics, Inc.</holder> |
||
| 10 | </copyright> |
||
| 11 | </refmetainfo> |
||
| 12 | <refentrytitle>gluTessEndPolygon</refentrytitle> |
||
| 13 | <manvolnum>3G</manvolnum> |
||
| 14 | </refmeta> |
||
| 15 | <refnamediv> |
||
| 16 | <refname>gluTessEndPolygon</refname> |
||
| 17 | <refpurpose>delimit a polygon description</refpurpose> |
||
| 18 | </refnamediv> |
||
| 19 | <refsynopsisdiv><title>C Specification</title> |
||
| 20 | <funcsynopsis> |
||
| 21 | <funcprototype> |
||
| 22 | <funcdef>void <function>gluTessEndPolygon</function></funcdef> |
||
| 23 | <paramdef>GLUtesselator* <parameter>tess</parameter></paramdef> |
||
| 24 | </funcprototype> |
||
| 25 | </funcsynopsis> |
||
| 26 | </refsynopsisdiv> |
||
| 27 | <!-- eqn: ignoring delim $$ --> |
||
| 28 | <refsect1 id="parameters"><title>Parameters</title> |
||
| 29 | <variablelist> |
||
| 30 | <varlistentry> |
||
| 31 | <term><parameter>tess</parameter></term> |
||
| 32 | <listitem> |
||
| 33 | <para> |
||
| 34 | Specifies the tessellation object (created with <citerefentry><refentrytitle>gluNewTess</refentrytitle></citerefentry>). |
||
| 35 | </para> |
||
| 36 | </listitem> |
||
| 37 | </varlistentry> |
||
| 38 | </variablelist> |
||
| 39 | </refsect1> |
||
| 40 | <refsect1 id="description"><title>Description</title> |
||
| 41 | <para> |
||
| 42 | <citerefentry><refentrytitle>gluTessBeginPolygon</refentrytitle></citerefentry> and <function>gluTessEndPolygon</function> delimit the |
||
| 43 | definition of a convex, concave, or self-intersecting polygon. Within |
||
| 44 | each <citerefentry><refentrytitle>gluTessBeginPolygon</refentrytitle></citerefentry>/<function>gluTessEndPolygon</function> pair, there must be |
||
| 45 | one or more calls to <citerefentry><refentrytitle>gluTessBeginContour</refentrytitle></citerefentry>/<citerefentry><refentrytitle>gluTessEndContour</refentrytitle></citerefentry>. |
||
| 46 | Within each contour, there are zero or more calls to <citerefentry><refentrytitle>gluTessVertex</refentrytitle></citerefentry>. |
||
| 47 | The vertices specify a closed contour (the last vertex of each contour |
||
| 48 | is automatically linked to the first). See the <citerefentry><refentrytitle>gluTessVertex</refentrytitle></citerefentry>, |
||
| 49 | <citerefentry><refentrytitle>gluTessBeginContour</refentrytitle></citerefentry>, and <citerefentry><refentrytitle>gluTessEndContour</refentrytitle></citerefentry> reference pages for |
||
| 50 | more details. |
||
| 51 | </para> |
||
| 52 | <para> |
||
| 53 | Once <function>gluTessEndPolygon</function> is called, the polygon is tessellated, and the |
||
| 54 | resulting triangles are described through callbacks. |
||
| 55 | See <citerefentry><refentrytitle>gluTessCallback</refentrytitle></citerefentry> for descriptions of the callback functions. |
||
| 56 | </para> |
||
| 57 | </refsect1> |
||
| 58 | <refsect1 id="example"><title>Example</title> |
||
| 59 | <para> |
||
| 60 | A quadrilateral with a triangular hole in it can be described like this: |
||
| 61 | <programlisting> |
||
| 62 | gluTessBeginPolygon(tobj, NULL); |
||
| 63 | gluTessBeginContour(tobj); |
||
| 64 | gluTessVertex(tobj, v1, v1); |
||
| 65 | gluTessVertex(tobj, v2, v2); |
||
| 66 | gluTessVertex(tobj, v3, v3); |
||
| 67 | gluTessVertex(tobj, v4, v4); |
||
| 68 | gluTessEndContour(tobj); |
||
| 69 | gluTessBeginContour(tobj); |
||
| 70 | gluTessVertex(tobj, v5, v5); |
||
| 71 | gluTessVertex(tobj, v6, v6); |
||
| 72 | gluTessVertex(tobj, v7, v7); |
||
| 73 | gluTessEndContour(tobj); |
||
| 74 | gluTessEndPolygon(tobj); |
||
| 75 | </programlisting> |
||
| 76 | In the above example the pointers, |
||
| 77 | <inlineequation><mml:math><mml:mi mathvariant="italic">v1</mml:mi></mml:math></inlineequation> |
||
| 78 | through |
||
| 79 | <inlineequation><mml:math><mml:mi mathvariant="italic">v7</mml:mi></mml:math></inlineequation>, |
||
| 80 | should point to different |
||
| 81 | addresses, |
||
| 82 | since the values stored at these addresses will not be read by |
||
| 83 | the tesselator until <function>gluTessEndPolygon</function> is called. |
||
| 84 | </para> |
||
| 85 | </refsect1> |
||
| 86 | <refsect1 id="seealso"><title>See Also</title> |
||
| 87 | <para> |
||
| 88 | <citerefentry><refentrytitle>gluNewTess</refentrytitle></citerefentry>, |
||
| 89 | <citerefentry><refentrytitle>gluTessBeginContour</refentrytitle></citerefentry>, |
||
| 90 | <citerefentry><refentrytitle>gluTessBeginPolygon</refentrytitle></citerefentry>, |
||
| 91 | <citerefentry><refentrytitle>gluTessCallback</refentrytitle></citerefentry>, |
||
| 92 | <citerefentry><refentrytitle>gluTessNormal</refentrytitle></citerefentry>, |
||
| 93 | <citerefentry><refentrytitle>gluTessProperty</refentrytitle></citerefentry>, |
||
| 94 | <citerefentry><refentrytitle>gluTessVertex</refentrytitle></citerefentry> |
||
| 95 | </para> |
||
| 96 | </refsect1> |
||
| 97 | <refsect1 id="Copyright"><title>Copyright</title> |
||
| 98 | <para> |
||
| 99 | Copyright <trademark class="copyright"></trademark> 1991-2006 |
||
| 100 | Silicon Graphics, Inc. This document is licensed under the SGI |
||
| 101 | Free Software B License. For details, see |
||
| 102 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. |
||
| 103 | </para> |
||
| 104 | </refsect1> |
||
| 105 | </refentry> |