.\" @(#)PEXGeoNormFillArea.3 1.5 95/03/24 SMI; .so man3/pex.macs .TH PEXGeoNormFillArea 3 "May 1995" "Solaris PEXlib Reference Manual" "" .SH NAME PEXGeoNormFillArea - utility function .SH SYNTAX .HP int PEXGeoNormFillArea\^(\^unsigned int \fIfacet_attributes\fP, unsigned int \fIvertex_attributes\fP, int \fIcolor_type\fP, PEXFacetData *\fIfacet_data\fP, unsigned int \fIcount\fP, PEXArrayOfVertex \fIvertices\fP) .SH PARAMETERS .IP \fIfacet_attributes\fP 1i A mask indicating the facet attributes provided. It should contain the bit .B PEXGANormal. .IP \fIvertex_attributes\fP 1i A mask indicating the vertex attributes provided. .IP \fIcolor_type\fP 1i The type of color data provided. .IP \fIfacet_data\fP 1i A pointer to facet data. This function adds the geometric normal to this data. .IP \fIcount\fP 1i The number of vertices. .IP \fIvertices\fP 1i An array of vertices defining the fill area. .SH RETURNS None .SH DESCRIPTION .\" indexing .IX PEXGeoNormFillArea .IX "Utility Functions" PEXGeoNormFillArea .IX "Fill Area" PEXGeoNormFillArea .LP This function computes the geometric normal of a fill area and stores it in the specified facet data. .LP The normal is computed by finding the first three non-colinear points in the specified .I vertices, forming two vectors from those points, one from the first point to the second point and one from the first point to the third point, and computing the cross product of those two vectors. The geometric normal is the normalized cross product. .LP The three points, A, B, and C are selected as follows. Point A is the first point in the list of vertices. Point B is the next point in the list that is not coincident with A. Point C is the next point in the list that is not colinear with A and B. If it is not possible to find three such points, the functions returns unsuccessfully. .LP If the facet attributes does not contain the bit .B PEXGANormal, the geometric normal is not computed. However, the function still returns successfully. .SH ERRORS None