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>gluNextContour</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="gluNextContour"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>gluNextContour — mark the beginning of another contour</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">gluNextContour</b>(</code></td><td>GLUtesselator* </td><td><var class="pdparam">tess</var>, </td></tr><tr><td> </td><td>GLenum </td><td><var class="pdparam">type</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>type</code></em></span></dt><dd><p> | |
6 | Specifies the type of the contour being defined. Valid values are | |
7 | <code class="constant">GLU_EXTERIOR</code>, | |
8 | <code class="constant">GLU_INTERIOR</code>, | |
9 | <code class="constant">GLU_UNKNOWN</code>, | |
10 | <code class="constant">GLU_CCW</code>, and | |
11 | <code class="constant">GLU_CW</code>. | |
12 | </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p> | |
13 | <code class="function">gluNextContour</code> is used in describing polygons with multiple contours. After the first | |
14 | contour has been described through a series of <a class="citerefentry" href="gluTessVertex.xml"><span class="citerefentry"><span class="refentrytitle">gluTessVertex</span></span></a> calls, | |
15 | a <code class="function">gluNextContour</code> call indicates that the previous contour is complete and that the | |
16 | next contour is about to begin. | |
17 | Another series of <a class="citerefentry" href="gluTessVertex.xml"><span class="citerefentry"><span class="refentrytitle">gluTessVertex</span></span></a> calls is then used to describe the new | |
18 | contour. This process can be repeated until all contours have been described. | |
19 | </p><p> | |
20 | <em class="parameter"><code>type</code></em> defines what type of contour follows. | |
21 | The legal contour types are as follows: | |
22 | </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GLU_EXTERIOR</code></span></dt><dd><p> | |
23 | An exterior contour defines an exterior boundary of the polygon. | |
24 | </p></dd><dt><span class="term"><code class="constant">GLU_INTERIOR</code></span></dt><dd><p> | |
25 | An interior contour defines an interior boundary of the polygon (such as | |
26 | a hole). | |
27 | </p></dd><dt><span class="term"><code class="constant">GLU_UNKNOWN</code></span></dt><dd><p> | |
28 | An unknown contour is analyzed by the library to determine if it is interior | |
29 | or exterior. | |
30 | </p></dd><dt><span class="term"><code class="constant">GLU_CCW</code>, </span></dt><dd></dd><dt><span class="term"><code class="constant">GLU_CW</code></span></dt><dd><p> | |
31 | The first <code class="constant">GLU_CCW</code> or <code class="constant">GLU_CW</code> contour defined is considered to | |
32 | be exterior. All other contours are considered to be exterior if they | |
33 | are oriented in the same direction (clockwise or counterclockwise) as | |
34 | the first contour, and interior if they are not. | |
35 | </p></dd></dl></div><p> | |
36 | If one contour is of type <code class="constant">GLU_CCW</code> or <code class="constant">GLU_CW</code>, then all | |
37 | contours must be of the same type (if they are not, then all <code class="constant">GLU_CCW</code> | |
38 | and <code class="constant">GLU_CW</code> contours will be changed to <code class="constant">GLU_UNKNOWN</code>). | |
39 | </p><p> | |
40 | Note that there is no real difference between the <code class="constant">GLU_CCW</code> and | |
41 | <code class="constant">GLU_CW</code> contour types. | |
42 | </p><p> | |
43 | Before the first contour is described, <code class="function">gluNextContour</code> can be called to | |
44 | define the type of the first contour. | |
45 | If <code class="function">gluNextContour</code> is not called before the first contour, then the first contour is | |
46 | marked <code class="constant">GLU_EXTERIOR</code>. | |
47 | </p><p> | |
48 | This command is obsolete and is provided for backward compatibility | |
49 | only. Calls to <code class="function">gluNextContour</code> are mapped to <a class="citerefentry" href="gluTessEndContour.xml"><span class="citerefentry"><span class="refentrytitle">gluTessEndContour</span></span></a> | |
50 | followed by | |
51 | <a class="citerefentry" href="gluTessBeginContour.xml"><span class="citerefentry"><span class="refentrytitle">gluTessBeginContour</span></span></a>. | |
52 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="example"></a><h2>Example</h2><p> | |
53 | A quadrilateral with a triangular hole in it can be described as follows: | |
54 | </p><pre class="programlisting"> | |
55 | gluBeginPolygon(tobj); | |
56 | gluTessVertex(tobj, v1, v1); | |
57 | gluTessVertex(tobj, v2, v2); | |
58 | gluTessVertex(tobj, v3, v3); | |
59 | gluTessVertex(tobj, v4, v4); | |
60 | gluNextContour(tobj, GLU_INTERIOR); | |
61 | gluTessVertex(tobj, v5, v5); | |
62 | gluTessVertex(tobj, v6, v6); | |
63 | gluTessVertex(tobj, v7, v7); | |
64 | gluEndPolygon(tobj); | |
65 | </pre><p> | |
66 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p> | |
67 | <a class="citerefentry" href="gluBeginPolygon.xml"><span class="citerefentry"><span class="refentrytitle">gluBeginPolygon</span></span></a>, | |
68 | <a class="citerefentry" href="gluNewTess.xml"><span class="citerefentry"><span class="refentrytitle">gluNewTess</span></span></a>, | |
69 | <a class="citerefentry" href="gluTessBeginContour.xml"><span class="citerefentry"><span class="refentrytitle">gluTessBeginContour</span></span></a>, | |
70 | <a class="citerefentry" href="gluTessCallback.xml"><span class="citerefentry"><span class="refentrytitle">gluTessCallback</span></span></a>, | |
71 | <a class="citerefentry" href="gluTessVertex.xml"><span class="citerefentry"><span class="refentrytitle">gluTessVertex</span></span></a> | |
72 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p> | |
73 | Copyright <span class="trademark"></span>© 1991-2006 | |
74 | Silicon Graphics, Inc. This document is licensed under the SGI | |
75 | Free Software B License. For details, see | |
76 | <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>. | |
77 | </p></div></div></body></html> |