rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / gluNextContour.xml
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="gluNextContour">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>gluNextContour</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>gluNextContour</refname>
17 <refpurpose>mark the beginning of another contour</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>gluNextContour</function></funcdef>
23 <paramdef>GLUtesselator* <parameter>tess</parameter></paramdef>
24 <paramdef>GLenum <parameter>type</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>type</parameter></term>
41 <listitem>
42 <para>
43 Specifies the type of the contour being defined. Valid values are
44 <constant>GLU_EXTERIOR</constant>,
45 <constant>GLU_INTERIOR</constant>,
46 <constant>GLU_UNKNOWN</constant>,
47 <constant>GLU_CCW</constant>, and
48 <constant>GLU_CW</constant>.
49 </para>
50 </listitem>
51 </varlistentry>
52 </variablelist>
53 </refsect1>
54 <refsect1 id="description"><title>Description</title>
55 <para>
56 <function>gluNextContour</function> is used in describing polygons with multiple contours. After the first
57 contour has been described through a series of <citerefentry><refentrytitle>gluTessVertex</refentrytitle></citerefentry> calls,
58 a <function>gluNextContour</function> call indicates that the previous contour is complete and that the
59 next contour is about to begin.
60 Another series of <citerefentry><refentrytitle>gluTessVertex</refentrytitle></citerefentry> calls is then used to describe the new
61 contour. This process can be repeated until all contours have been described.
62 </para>
63 <para>
64 <parameter>type</parameter> defines what type of contour follows.
65 The legal contour types are as follows:
66 </para>
67 <variablelist>
68 <varlistentry>
69 <term><constant>GLU_EXTERIOR</constant></term>
70 <listitem>
71 <para>
72 An exterior contour defines an exterior boundary of the polygon.
73 </para>
74 </listitem>
75 </varlistentry>
76 <varlistentry>
77 <term><constant>GLU_INTERIOR</constant></term>
78 <listitem>
79 <para>
80 An interior contour defines an interior boundary of the polygon (such as
81 a hole).
82 </para>
83 </listitem>
84 </varlistentry>
85 <varlistentry>
86 <term><constant>GLU_UNKNOWN</constant></term>
87 <listitem>
88 <para>
89 An unknown contour is analyzed by the library to determine if it is interior
90 or exterior.
91 </para>
92 </listitem>
93 </varlistentry>
94 <varlistentry>
95 <term><constant>GLU_CCW</constant>, </term>
96 <listitem>
97 </listitem>
98 </varlistentry>
99 <varlistentry>
100 <term><constant>GLU_CW</constant></term>
101 <listitem>
102 <para>
103 The first <constant>GLU_CCW</constant> or <constant>GLU_CW</constant> contour defined is considered to
104 be exterior. All other contours are considered to be exterior if they
105 are oriented in the same direction (clockwise or counterclockwise) as
106 the first contour, and interior if they are not.
107 </para>
108 </listitem>
109 </varlistentry>
110 </variablelist>
111 <para>
112 If one contour is of type <constant>GLU_CCW</constant> or <constant>GLU_CW</constant>, then all
113 contours must be of the same type (if they are not, then all <constant>GLU_CCW</constant>
114 and <constant>GLU_CW</constant> contours will be changed to <constant>GLU_UNKNOWN</constant>).
115 </para>
116 <para>
117 Note that there is no real difference between the <constant>GLU_CCW</constant> and
118 <constant>GLU_CW</constant> contour types.
119 </para>
120 <para>
121 Before the first contour is described, <function>gluNextContour</function> can be called to
122 define the type of the first contour.
123 If <function>gluNextContour</function> is not called before the first contour, then the first contour is
124 marked <constant>GLU_EXTERIOR</constant>.
125 </para>
126 <para>
127 This command is obsolete and is provided for backward compatibility
128 only. Calls to <function>gluNextContour</function> are mapped to <citerefentry><refentrytitle>gluTessEndContour</refentrytitle></citerefentry>
129 followed by
130 <citerefentry><refentrytitle>gluTessBeginContour</refentrytitle></citerefentry>.
131 </para>
132 </refsect1>
133 <refsect1 id="example"><title>Example</title>
134 <para>
135 A quadrilateral with a triangular hole in it can be described as follows:
136 <programlisting>
137 gluBeginPolygon(tobj);
138 gluTessVertex(tobj, v1, v1);
139 gluTessVertex(tobj, v2, v2);
140 gluTessVertex(tobj, v3, v3);
141 gluTessVertex(tobj, v4, v4);
142 gluNextContour(tobj, GLU_INTERIOR);
143 gluTessVertex(tobj, v5, v5);
144 gluTessVertex(tobj, v6, v6);
145 gluTessVertex(tobj, v7, v7);
146 gluEndPolygon(tobj);
147 </programlisting>
148 </para>
149 </refsect1>
150 <refsect1 id="seealso"><title>See Also</title>
151 <para>
152 <citerefentry><refentrytitle>gluBeginPolygon</refentrytitle></citerefentry>,
153 <citerefentry><refentrytitle>gluNewTess</refentrytitle></citerefentry>,
154 <citerefentry><refentrytitle>gluTessBeginContour</refentrytitle></citerefentry>,
155 <citerefentry><refentrytitle>gluTessCallback</refentrytitle></citerefentry>,
156 <citerefentry><refentrytitle>gluTessVertex</refentrytitle></citerefentry>
157 </para>
158 </refsect1>
159 <refsect1 id="Copyright"><title>Copyright</title>
160 <para>
161 Copyright <trademark class="copyright"></trademark> 1991-2006
162 Silicon Graphics, Inc. This document is licensed under the SGI
163 Free Software B License. For details, see
164 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
165 </para>
166 </refsect1>
167 </refentry>