rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man2 / gluTessProperty.xml
CommitLineData
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="gluTessProperty">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>gluTessProperty</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>gluTessProperty</refname>
17 <refpurpose>set a tessellation object property</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>gluTessProperty</function></funcdef>
23 <paramdef>GLUtesselator* <parameter>tess</parameter></paramdef>
24 <paramdef>GLenum <parameter>which</parameter></paramdef>
25 <paramdef>GLdouble <parameter>data</parameter></paramdef>
26 </funcprototype>
27 </funcsynopsis>
28 </refsynopsisdiv>
29 <!-- eqn: ignoring delim $$ -->
30 <refsect1 id="parameters"><title>Parameters</title>
31 <variablelist>
32 <varlistentry>
33 <term><parameter>tess</parameter></term>
34 <listitem>
35 <para>
36 Specifies the tessellation object (created with <citerefentry><refentrytitle>gluNewTess</refentrytitle></citerefentry>).
37 </para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>which</parameter></term>
42 <listitem>
43 <para>
44 Specifies the property to be set. Valid values are
45 <constant>GLU_TESS_WINDING_RULE</constant>,
46 <constant>GLU_TESS_BOUNDARY_ONLY</constant>, and
47 <constant>GLU_TESS_TOLERANCE</constant>.
48 </para>
49 </listitem>
50 </varlistentry>
51 <varlistentry>
52 <term><parameter>data</parameter></term>
53 <listitem>
54 <para>
55 Specifies the value of the indicated property.
56 </para>
57 </listitem>
58 </varlistentry>
59 </variablelist>
60 </refsect1>
61 <refsect1 id="description"><title>Description</title>
62 <para>
63 <function>gluTessProperty</function> is used to control properties stored in a tessellation object. These
64 properties affect the way that the polygons are interpreted and rendered.
65 The legal values for <parameter>which</parameter> are as follows:
66 </para>
67 <variablelist>
68 <varlistentry>
69 <term><constant>GLU_TESS_WINDING_RULE</constant> </term>
70 <listitem>
71 <para>
72 Determines which parts of the polygon are on the ``interior''.
73 <parameter>data</parameter> may be set to one of <constant>GLU_TESS_WINDING_ODD</constant>,
74 <constant>GLU_TESS_WINDING_NONZERO</constant>, <constant>GLU_TESS_WINDING_POSITIVE</constant>,
75 <constant>GLU_TESS_WINDING_NEGATIVE</constant>, or <constant>GLU_TESS_WINDING_ABS_GEQ_TWO</constant>.
76 </para>
77 <para>
78 To understand how the winding rule works, consider that the input
79 contours partition the plane into regions. The winding rule determines which
80 of these regions are inside the polygon.
81 </para>
82 <para>
83 For a single contour C, the winding number of a point x is simply the signed
84 number of revolutions we make around x as we travel once around C
85 (where CCW is positive). When there are several contours, the individual
86 winding numbers are summed. This procedure associates a signed integer
87 value with each point x in the plane. Note that the winding number is the
88 same for all points in a single region.
89 </para>
90 <para>
91 The winding rule classifies a region as ``inside'' if its winding number
92 belongs to the chosen category (odd, nonzero, positive, negative, or
93 absolute value of at least two). The previous GLU tessellator (prior to
94 GLU 1.2) used the ``odd'' rule. The ``nonzero'' rule is another common way to
95 define the interior. The other three rules are useful for polygon CSG
96 operations.
97 </para>
98 </listitem>
99 </varlistentry>
100 <varlistentry>
101 <term><constant>GLU_TESS_BOUNDARY_ONLY</constant> </term>
102 <listitem>
103 <para>
104 Is a boolean value (``value'' should be set
105 to GL_TRUE or GL_FALSE). When set to GL_TRUE, a set of closed contours
106 separating the polygon interior and exterior are returned instead of a
107 tessellation. Exterior contours are oriented CCW with respect to the
108 normal; interior contours are oriented CW. The <constant>GLU_TESS_BEGIN</constant>
109 and <constant>GLU_TESS_BEGIN_DATA</constant> callbacks use the type GL_LINE_LOOP for
110 each contour.
111 </para>
112 </listitem>
113 </varlistentry>
114 <varlistentry>
115 <term><constant>GLU_TESS_TOLERANCE</constant></term>
116 <listitem>
117 <para>
118 Specifies a tolerance for merging features to reduce the size of the output.
119 For example, two vertices that are very close to each other might be
120 replaced by a single vertex. The tolerance is multiplied by the largest
121 coordinate magnitude of any input vertex; this specifies the maximum
122 distance that any feature can move as the result of a single merge
123 operation. If a single feature takes part in several merge operations, the
124 total distance moved could be larger.
125 </para>
126 <para>
127 Feature merging is completely optional; the tolerance is only a hint.
128 The implementation is free to merge in some cases and not in others, or to
129 never merge features at all. The initial tolerance is 0.
130 </para>
131 <para>
132 The current implementation merges vertices only if they are exactly
133 coincident, regardless of the current tolerance. A vertex is spliced into
134 an edge only if the implementation is unable to distinguish which side of
135 the edge the vertex lies on. Two edges are merged only when both endpoints
136 are identical.
137 </para>
138 </listitem>
139 </varlistentry>
140 </variablelist>
141 </refsect1>
142 <refsect1 id="seealso"><title>See Also</title>
143 <para>
144 <citerefentry><refentrytitle>gluGetTessProperty</refentrytitle></citerefentry>,
145 <citerefentry><refentrytitle>gluNewTess</refentrytitle></citerefentry>
146 </para>
147 </refsect1>
148 <refsect1 id="Copyright"><title>Copyright</title>
149 <para>
150 Copyright <trademark class="copyright"></trademark> 1991-2006
151 Silicon Graphics, Inc. This document is licensed under the SGI
152 Free Software B License. For details, see
153 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
154 </para>
155 </refsect1>
156</refentry>