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