summaryrefslogtreecommitdiff
path: root/doc/gl-docs/GLU/tessnormal.3gl
blob: 4d98298b45eb7a9bb6145377bd2902a5586330ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
'\" e
'\"! eqn | mmdoc
'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 6 March 1997
.ds Re Release 1.2.0
.ds Dp May 02 11:53
.ds Dm 37 tessnorma
.ds Xs 47097 4 tessnormal.gl
.TH GLUTESSNORMAL 3G
.SH NAME
.B "gluTessNormal
\- specify a normal for a polygon

.SH C SPECIFICATION
void \f3gluTessNormal\fP(
GLUtesselator* \fItess\fP,
.nf
.ta \w'\f3void \fPgluTessNormal( 'u
	GLdouble \fIvalueX\fP,
	GLdouble \fIvalueY\fP,
	GLdouble \fIvalueZ\fP )
.fi

.EQ
delim $$
.EN
.SH PARAMETERS
.TP \w'\fIvalueX\fP\ \ 'u 
\f2tess\fP
Specifies the tessellation object (created with \%\f3gluNewTess\fP).
.TP
\f2valueX\fP
Specifies the first component of the normal.
.TP
\f2valueY\fP
Specifies the second component of the normal.
.TP
\f2valueZ\fP
Specifies the third component of the normal.
.SH DESCRIPTION
\%\f3gluTessNormal\fP describes a normal for a polygon that the program is defining.
All input data will be projected onto a plane perpendicular to one of 
the three coordinate axes before tessellation and all output triangles
will be oriented CCW with 
respect to the normal (CW orientation can be obtained by reversing the
sign of the supplied normal). For example, if you know that all polygons
lie in the x-y plane, call \%\f3gluTessNormal\fP(tess, 0.0, 0.0, 1.0)
before rendering any polygons.
.P
If the supplied normal is (0.0, 0.0, 0.0) (the initial value), the normal is
determined as follows. The direction of the normal, up to its sign, is
found by fitting a plane to the vertices, without regard to how the
vertices are connected. It is expected that the input data lies approximately
in the plane; otherwise, projection perpendicular to one of the three
coordinate axes may substantially change the geometry. The sign of the
normal is chosen so that the sum of the signed areas of all input
contours is nonnegative (where a CCW contour has positive area).
.P
The supplied normal persists until it is changed by another call to 
\%\f3gluTessNormal\fP.
.SH SEE ALSO
\%\f3gluTessBeginPolygon(3G)\fP, 
\%\f3gluTessEndPolygon(3G)\fP