Opentk/Source/Bind/Specifications/Docs/gluTessProperty.xml
2009-03-08 00:46:58 +00:00

156 lines
8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
<refentry id="gluTessProperty">
<refmeta>
<refmetainfo>
<copyright>
<year>1991-2006</year>
<holder>Silicon Graphics, Inc.</holder>
</copyright>
</refmetainfo>
<refentrytitle>gluTessProperty</refentrytitle>
<manvolnum>3G</manvolnum>
</refmeta>
<refnamediv>
<refname>gluTessProperty</refname>
<refpurpose>set a tessellation object property</refpurpose>
</refnamediv>
<refsynopsisdiv><title>C Specification</title>
<funcsynopsis>
<funcprototype>
<funcdef>void <function>gluTessProperty</function></funcdef>
<paramdef>GLUtesselator* <parameter>tess</parameter></paramdef>
<paramdef>GLenum <parameter>which</parameter></paramdef>
<paramdef>GLdouble <parameter>data</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<!-- eqn: ignoring delim $$ -->
<refsect1 id="parameters"><title>Parameters</title>
<variablelist>
<varlistentry>
<term><parameter>tess</parameter></term>
<listitem>
<para>
Specifies the tessellation object (created with <citerefentry><refentrytitle>gluNewTess</refentrytitle></citerefentry>).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>which</parameter></term>
<listitem>
<para>
Specifies the property to be set. Valid values are
<constant>GLU_TESS_WINDING_RULE</constant>,
<constant>GLU_TESS_BOUNDARY_ONLY</constant>, and
<constant>GLU_TESS_TOLERANCE</constant>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
Specifies the value of the indicated property.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="description"><title>Description</title>
<para>
<function>gluTessProperty</function> is used to control properties stored in a tessellation object. These
properties affect the way that the polygons are interpreted and rendered.
The legal values for <parameter>which</parameter> are as follows:
</para>
<variablelist>
<varlistentry>
<term><constant>GLU_TESS_WINDING_RULE</constant> </term>
<listitem>
<para>
Determines which parts of the polygon are on the ``interior''.
<parameter>data</parameter> may be set to one of <constant>GLU_TESS_WINDING_ODD</constant>,
<constant>GLU_TESS_WINDING_NONZERO</constant>, <constant>GLU_TESS_WINDING_POSITIVE</constant>,
<constant>GLU_TESS_WINDING_NEGATIVE</constant>, or <constant>GLU_TESS_WINDING_ABS_GEQ_TWO</constant>.
</para>
<para>
To understand how the winding rule works, consider that the input
contours partition the plane into regions. The winding rule determines which
of these regions are inside the polygon.
</para>
<para>
For a single contour C, the winding number of a point x is simply the signed
number of revolutions we make around x as we travel once around C
(where CCW is positive). When there are several contours, the individual
winding numbers are summed. This procedure associates a signed integer
value with each point x in the plane. Note that the winding number is the
same for all points in a single region.
</para>
<para>
The winding rule classifies a region as ``inside'' if its winding number
belongs to the chosen category (odd, nonzero, positive, negative, or
absolute value of at least two). The previous GLU tessellator (prior to
GLU 1.2) used the ``odd'' rule. The ``nonzero'' rule is another common way to
define the interior. The other three rules are useful for polygon CSG
operations.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GLU_TESS_BOUNDARY_ONLY</constant> </term>
<listitem>
<para>
Is a boolean value (``value'' should be set
to GL_TRUE or GL_FALSE). When set to GL_TRUE, a set of closed contours
separating the polygon interior and exterior are returned instead of a
tessellation. Exterior contours are oriented CCW with respect to the
normal; interior contours are oriented CW. The <constant>GLU_TESS_BEGIN</constant>
and <constant>GLU_TESS_BEGIN_DATA</constant> callbacks use the type GL_LINE_LOOP for
each contour.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>GLU_TESS_TOLERANCE</constant></term>
<listitem>
<para>
Specifies a tolerance for merging features to reduce the size of the output.
For example, two vertices that are very close to each other might be
replaced by a single vertex. The tolerance is multiplied by the largest
coordinate magnitude of any input vertex; this specifies the maximum
distance that any feature can move as the result of a single merge
operation. If a single feature takes part in several merge operations, the
total distance moved could be larger.
</para>
<para>
Feature merging is completely optional; the tolerance is only a hint.
The implementation is free to merge in some cases and not in others, or to
never merge features at all. The initial tolerance is 0.
</para>
<para>
The current implementation merges vertices only if they are exactly
coincident, regardless of the current tolerance. A vertex is spliced into
an edge only if the implementation is unable to distinguish which side of
the edge the vertex lies on. Two edges are merged only when both endpoints
are identical.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="seealso"><title>See Also</title>
<para>
<citerefentry><refentrytitle>gluGetTessProperty</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>gluNewTess</refentrytitle></citerefentry>
</para>
</refsect1>
<refsect1 id="Copyright"><title>Copyright</title>
<para>
Copyright <trademark class="copyright"></trademark> 1991-2006
Silicon Graphics, Inc. This document is licensed under the SGI
Free Software B License. For details, see
<ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
</para>
</refsect1>
</refentry>