gluTessProperty

Aus DGL Wiki
Version vom 28. September 2004, 17:16 Uhr von Flash (Diskussion | Beiträge) (Version Hochgeladen)

Wechseln zu: Navigation, Suche
Hinweis: Dieser Artikel ist noch unvollständig.
(Mehr Informationen/weitere Artikel)

{{{1}}}

Incomplete.jpg

gluTessProperty


Name

gluTessProperty - Beschreibung...


Delphi-Spezifikation

procedure gluTessProperty(tess: PGLUtesselator; which: TGLEnum; value: TGLdouble);


Parameter

tess Bestimmt ein Tesselierungsobjekt (erstellt mit gluNewTess).
which Bestimmt die Eigenschaft, die geändert werden soll. Akzeptiert werden:
GLU_TESS_WINDING_RULE, GLU_TESS_BOUNDARY_ONLY, und GLU_TESS_TOLERANCE.
value Beschreibt den neuen Wert auf den die ausgewählte Eigenschaft gesetzt werden soll.


Beschreibung

gluTessProperty steuert die Eigenschaften die in einem Tesselierungsobjekt abgespeichert sind. Die Eigenschaften beeinflussen die Art und Weise in der die Polygone interpretiert und gerendert werden.
Akzeptiert werden folgende Werte:

GLU_TESS_WINDING_RULE

Bestimmt welche Teile des Polygons "innen" sind.
value sollte dabei einen der folgenden Werte besitzen:
GLU_TESS_WINDING_ODD, GLU_TESS_WINDING_NONZERO, GLU_TESS_WINDING_POSITIVE, oder GLU_TESS_WINDING_NEGATIVE, oder GLU_TESS_WINDING_ABS_GEQ_TWO.

To understand how the winding rule works, first consider that the input contours partition the plane into regions. The winding rule determines which of these regions are inside the polygon.
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 counterclockwise 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.The winding rule classifies a region as "inside" if its winding number belongs to the chosen category (odd, non-zero, positive, negative, or absolute value of at least two). The previous GLU tessellator (prior to GLU 1.2) used the "odd" rule. The "non-zero" rule is another common way to define the interior. The other three rules are useful for polygon CSG operations.

GLU_TESS_BOUNDARY_ONLY

Specifies 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 counterclockwise with respect to the normal, interior contours are oriented clockwise. The GLU_TESS_BEGIN and GLU_TESS_BEGIN_DATA callbacks use the type GL_LINE_LOOP for each contour.

GLU_TESS_TOLERANCE

Specifies a tolerance for merging features to reduce the size of the output. For example, two vertexes 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 can be larger.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 default tolerance is zero.
The current implementation merges vertexes 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.


Siehe auch

gluGetTessProperty