Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd"> |
2 | <!-- saved from url=(0013)about:internet --> | |
3 | <?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>gluTessBeginPolygon</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="gluTessBeginPolygon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>gluTessBeginPolygon — delimit a polygon description</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">gluTessBeginPolygon</b>(</code></td><td>GLUtesselator* </td><td><var class="pdparam">tess</var>, </td></tr><tr><td> </td><td>GLvoid* </td><td><var class="pdparam">data</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>tess</code></em></span></dt><dd><p> | |
4 | Specifies the tessellation object (created with <a class="citerefentry" href="gluNewTess.xml"><span class="citerefentry"><span class="refentrytitle">gluNewTess</span></span></a>). | |
5 | </p></dd><dt><span class="term"><em class="parameter"><code>data</code></em></span></dt><dd><p> | |
6 | Specifies a pointer to user polygon data. | |
7 | </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p> | |
8 | <code class="function">gluTessBeginPolygon</code> and <a class="citerefentry" href="gluTessEndPolygon.xml"><span class="citerefentry"><span class="refentrytitle">gluTessEndPolygon</span></span></a> delimit the definition of a | |
9 | convex, concave or self-intersecting polygon. Within each <code class="function">gluTessBeginPolygon</code>/<a class="citerefentry" href="gluTessEndPolygon.xml"><span class="citerefentry"><span class="refentrytitle">gluTessEndPolygon</span></span></a> | |
10 | pair, there must be one or more calls to <a class="citerefentry" href="gluTessBeginContour.xml"><span class="citerefentry"><span class="refentrytitle">gluTessBeginContour</span></span></a>/<a class="citerefentry" href="gluTessEndContour.xml"><span class="citerefentry"><span class="refentrytitle">gluTessEndContour</span></span></a>. | |
11 | Within each contour, there are zero or more calls to <a class="citerefentry" href="gluTessVertex.xml"><span class="citerefentry"><span class="refentrytitle">gluTessVertex</span></span></a>. The vertices | |
12 | specify a closed contour (the last vertex of each contour is automatically linked | |
13 | to the first). See the <a class="citerefentry" href="gluTessVertex.xml"><span class="citerefentry"><span class="refentrytitle">gluTessVertex</span></span></a>, <a class="citerefentry" href="gluTessBeginContour.xml"><span class="citerefentry"><span class="refentrytitle">gluTessBeginContour</span></span></a>, and | |
14 | <a class="citerefentry" href="gluTessEndContour.xml"><span class="citerefentry"><span class="refentrytitle">gluTessEndContour</span></span></a> reference pages for more details. | |
15 | </p><p> | |
16 | <em class="parameter"><code>data</code></em> is a pointer to a user-defined data structure. If the appropriate callback(s) | |
17 | are specified (see <a class="citerefentry" href="gluTessCallback.xml"><span class="citerefentry"><span class="refentrytitle">gluTessCallback</span></span></a>), then this pointer is returned to the | |
18 | callback function(s). Thus, it is a convenient way to store per-polygon information. | |
19 | </p><p> | |
20 | Once <a class="citerefentry" href="gluTessEndPolygon.xml"><span class="citerefentry"><span class="refentrytitle">gluTessEndPolygon</span></span></a> is called, the polygon is tessellated, and the | |
21 | resulting triangles are described through callbacks. | |
22 | See <a class="citerefentry" href="gluTessCallback.xml"><span class="citerefentry"><span class="refentrytitle">gluTessCallback</span></span></a> for descriptions of the callback functions. | |
23 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="example"></a><h2>Example</h2><p> | |
24 | A quadrilateral with a triangular hole in it can be described as follows: | |
25 | </p><pre class="programlisting"> | |
26 | gluTessBeginPolygon(tobj, NULL); | |
27 | gluTessBeginContour(tobj); | |
28 | gluTessVertex(tobj, v1, v1); | |
29 | gluTessVertex(tobj, v2, v2); | |
30 | gluTessVertex(tobj, v3, v3); | |
31 | gluTessVertex(tobj, v4, v4); | |
32 | gluTessEndContour(tobj); | |
33 | gluTessBeginContour(tobj); | |
34 | gluTessVertex(tobj, v5, v5); | |
35 | gluTessVertex(tobj, v6, v6); | |
36 | gluTessVertex(tobj, v7, v7); | |
37 | gluTessEndContour(tobj); | |
38 | gluTessEndPolygon(tobj); | |
39 | </pre><p> | |
40 | </p><p> | |
41 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p> | |
42 | <a class="citerefentry" href="gluNewTess.xml"><span class="citerefentry"><span class="refentrytitle">gluNewTess</span></span></a>, | |
43 | <a class="citerefentry" href="gluTessBeginContour.xml"><span class="citerefentry"><span class="refentrytitle">gluTessBeginContour</span></span></a>, | |
44 | <a class="citerefentry" href="gluTessCallback.xml"><span class="citerefentry"><span class="refentrytitle">gluTessCallback</span></span></a>, | |
45 | <a class="citerefentry" href="gluTessEndPolygon.xml"><span class="citerefentry"><span class="refentrytitle">gluTessEndPolygon</span></span></a>, | |
46 | <a class="citerefentry" href="gluTessNormal.xml"><span class="citerefentry"><span class="refentrytitle">gluTessNormal</span></span></a>, | |
47 | <a class="citerefentry" href="gluTessProperty.xml"><span class="citerefentry"><span class="refentrytitle">gluTessProperty</span></span></a>, | |
48 | <a class="citerefentry" href="gluTessVertex.xml"><span class="citerefentry"><span class="refentrytitle">gluTessVertex</span></span></a> | |
49 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p> | |
50 | Copyright <span class="trademark"></span>© 1991-2006 | |
51 | Silicon Graphics, Inc. This document is licensed under the SGI | |
52 | Free Software B License. For details, see | |
53 | <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>. | |
54 | </p></div></div></body></html> |