int PEXOCCGeoNormQuadrilateralMesh( PEXOCC context, PEXPointer occ_facet_data, unsigned int col_count, unsigned int row_count, PEXPointer occ_vertices, int handedness )
int PEXGeoNormQuadrilateralMesh( unsigned int facet_attributes, unsigned int vertex_attributes, int color_type, PEXArrayOfFacetData facet_data, unsigned int col_count, unsigned int row_count, PEXArrayOfVertex vertices )
Zero if successful; otherwise, one of the following:
Invoke PEXOCCGeoNormQuadrilateralMesh to compute the geometric normals of a quadrilateral mesh and store them in the specified facet data.
The geometric normal of each quadrilateral is computed by forming two vectors from two of its sides, and computing the cross product of those two vectors. The geometric normal is the normalized cross product:
Ng = (V1 x V2) / |V1 x V2|
Given the quadrilateral composed of four vertices, Pi, j, where i indicates the row of the point and j its column, the first vector, V1, is from Pi, j, to Pi+1, ,j+1. The second vector, V2, is from Pi+1, j to Pi, j+1.
PEXGeoNormQuadrilateralMesh 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.
A geometric normal is computed for all quadrilaterals where it is possible to compute one, even if a normal cannot be computed for some other quadrilaterals. An error is returned if a normal cannot be computed for one or more of the quadrilaterals in the mesh.
None.
For a list of utilities that compute geometric normals, see Computing Geometric Normals. For a list of related topics, see PEXlib Utilities.