.\" @(#)PEXGeoNormSetOfFillAreaSets.3 1.5 95/03/24 SMI; .so man3/pex.macs .TH PEXGeoNormSetOfFillAreaSets 3 "May 1995" "Solaris PEXlib Reference Manual" "" .SH NAME PEXGeoNormSetOfFillAreaSets - utility function .SH SYNTAX .HP int PEXGeoNormSetOfFillAreaSets\^(\^unsigned int \fIfacet_attributes\fP, unsigned int \fIvertex_attributes\fP, int \fIcolor_type\fP, unsigned int \fIset_count\fP, PEXArrayOfFacetData \fIfacet_data\fP, unsigned int \fIvertex_count\fP, PEXArrayOfVertex \fIvertices\fP, unsigned int \fIindex_count\fP, PEXConnectivityData *\fIconnectivity\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 \fIset_count\fP 1i The number of fill area sets. .IP \fIfacet_data\fP 1i An array of facet data. This function adds the geometric normals to this data. .IP \fIvertex_count\fP 1i The number of vertices. .IP \fIvertices\fP 1i An array of vertices. .IP \fIindex_count\fP 1i The number of vertex connectivity indices. .IP \fIconnectivity\fP 1i A pointer to the list of contour connectivity data. .SH RETURNS Zero if successful; otherwise, one of the following: .TP .B PEXBadPrimitive A normal cannot be computed for a fill area set because all its fill areas are degenerate or because all the vertices of all fill areas in the set are colinear. .SH DESCRIPTION .\" indexing .IX PEXGeoNormSetOfFillAreaSets .IX "Utility Functions" PEXGeoNormSetOfFillAreaSets .IX "Fill Area" PEXGeoNormSetOfFillAreaSets .LP This function computes the geometric normals of set of fill area sets primitive and stores them in the specified facet data. .LP The normals are computed by finding the first three non-colinear points in each fill area set, beginning with the first fill area of each set and searching until three such points are found in a single fill area. Two vectors are formed from these points: one vector from the first point to the second point, and one vector from the first point to the third point. The geometric normal returned is the normalized cross product of these two vectors. .LP The three points for each fill area set are selected as described for .BR PEXGeoNormFillAreaSet (3) . .LP If the facet attributes does not contain the bit .B PEXGANormal, the geometric normal is not computed. However, the function still returns successfully. .LP A geometric normal is computed for all fill area sets where it is possible to compute one, even if a normal cannot be computed for some other fill area sets. The function returns unsuccessfully if a normal cannot be computed for one or more of the fill area sets. .SH DATA STRUCTURES .LP .nf typedef struct { unsigned short count; /* number of lists */ PEXListOfUShort *lists; .br } PEXConnectivityData; .sp typedef struct { unsigned short count; /* number of shorts */ unsigned short *shorts; .br } PEXListOfUShort; .fi .sp .5 See also .B PEXlib.h. .SH ERRORS None