.\" @(#)PEXTransformPoints2D.3 1.4 95/03/24 SMI; .so man3/pex.macs .TH PEXTransformPoints2D 3 "May 1995" "Solaris PEXlib Reference Manual" "" .SH NAME PEXTransformPoints2D - utility function .SH SYNTAX .HP int PEXTransformPoints2D\^(\^PEXMatrix3x3 \fItransform\fP, int \fIcount\fP, PEXCoord2D *\fIpoints\fP, PEXCoord2D *\fIpoints_return\fP\^) .SH PARAMETERS .IP \fItransform\fP 1i The transformation matrix to apply to the points. .IP \fIcount\fP 1i The number of points to transform. .IP \fIpoints\fP 1i A pointer to an array of 2D points to transform. .IP \fIpoints_return\fP 1i A pointer to an array in which to store the transformed points. .SH RETURNS .LP Zero if successful; otherwise, one of the following: .TP .B PEXBadHomoCoord One or more of the transformed points has a homogeneous coordinate of 0. .SH DESCRIPTION .\" indexing .IX PEXTransformPoints2D .LP This function applies the specified homogeneous transformation matrix to the list of .I points. In applying the transformation, the .I points are first converted to homogeneous points by assigning them a homogeneous coordinate of 1. The transformation is then applied: .LP .RS P' = TxP .RE .LP Where P is the point, treated as a column vector, and T is the transformation matrix. The .I points are then mapped to 2D by dividing their first three coordinates by the computed homogeneous coordinate. .LP If the function returns unsuccessfully, all .I points other than those with a homogeneous coordinate of 0 will be transformed and returned. .LP If the return array is the same as the input array, the function will overwrite the input values with the transformed values. .SH ERRORS .LP None .SH SEE ALSO .LP .nf .BR PEXTransformPoints (3) .BR PEXTransformPoints4D (3) .BR PEXTransformPoints2DH (3) .fi