int PEXOCCGeoNormFillAreaSet( PEXOCC context, unsigned int count, PEXPointer occ_facet_data, PEXListOfVertexData *occ_vertex_data, int handedness )
int PEXGeoNormFillAreaSet( unsigned int facet_attributes, unsigned int vertex_attributes, int color_type, unsigned int count, PEXFacetData *facet_data, PEXListOfVertex *vertex_lists )
Zero if successful; otherwise, one of the following:
Invoke PEXOCCGeoNormFillAreaSet to compute the geometric normal of a fill area set and store it in the specified facet data.
The normal is computed by finding the first three non- colinear points in a fill area of the set, beginning with the first fill area 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 those two vectors.
The three points, A, B, and C are selected as follows. Point A is the first point in the first list of vertices. Point B is the next point in that same list that is not coincident with A. Point C is the next point in that same list that is not colinear with A and B. If it is not possible to find three such points in the first list, then the rest of the lists are searched in order to select three appropriate points from a single list. If it is still not possible to find three such points in any list, the functions returns unsuccessfully.
PEXGeoNormFillAreaSet assumes the handedness is PEXVertexOrderRightHand.
Specify the handedness argument to generate normals that match the orientation of the coordinate system that the vertex data uses. PEXVertexOrderRightHand indicates that the coordinate system is right-handed, and PEXVertexOrderLeftHand indicates that the normals are to be "flipped" from the right-handed orientation to match a left-handed coordinate system.
If the facet attributes does not contain the bit PEXGANormal, then this utility does not compute the geometric normal. However, this utility still returns successfully.
None.
For a list of utilities that compute geometric normals, see Computing Geometric Normals. For a list of related topics, see PEXlib Utilities.