gluTessNormal

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

{{{1}}}

Incomplete.jpg

gluTessNormal


Name

gluTessNormal - definiert die Normale für ein Polygon.


Delphi-Spezifikation

procedure gluTessNormal(tess: PGLUtesselator; x, y, z: TGLdouble);


Parameter

tess Bestimmt das Tesselierungsobjekt (erstellt mit gluNewTess).
x, y, z Bestimmt die x, y, z Komponente einer Normale.


Beschreibung

Mit gluTessNormal beschreiben Sie die Normale für ein Polygon das Sie definieren. All input data is projected onto a plane perpendicular to one of the three coordinate axes before tessellation, and all output triangles are oriented counterclockwise with respect to the normal. (Eine Ausrichtung im Uhrzeigersinn kann erreicht werden, indem das Vorzeichen der gelieferten Normale geändert wird.) Wenn, zum Beispiel, bekannt ist, dass alle Polygone in der X-Y-Ebene liegen, ruft man gluTessNormal(tess, 0.0, 0.0, 1.0) vor dem Rendern der Polygone auf.

Wenn die übergebene Normale (0,0,0) ist (der Vorgabewert), wird die Normale folgendermaßen bestimmt:
Die Richtung der Normalen, im Bezug auf ihr Vorzeichen, wird gefunden in dem man eine Ebene aus den Vertexen bildet. Dabei wird beachted wie die Vertices miteinander verbunden sind (Reihenfolge). Es wird dabei davon ausgegangen, dass die Vertices annähernd in einer Ebene liegen. Wenn dem nicht so ist, wird otherwise projection perpendicular to one of the three coordinate axes can change the geometry substantially. The sign of the normal is chosen so that the sum of the signed areas of all input contours is non-negative (where a counter-clock-wise contour has positive area).

Die übergebene Normale bleibt solange gültig, bis gluTessNormal erneut aufgerufen wurde.


Siehe auch

gluTessBeginPolygon, gluTessEndPolygon

Hintergrundwissen: Tesselierung