PEXRotateGeneral Utility


Synopsis

 
   int PEXRotateGeneral(
       PEXCoord *point1,
       PEXCoord *point2,
       double angle,
       PEXMatrix matrix_return
   )
 

Arguments

point1
Endpoint of line segment defining rotation axis.

point2
Endpoint of line segment defining rotation axis.

angle
Angle of the rotation in radians.

matrix_return
Matrix into which rotation matrix is stored.

Returns

Zero if successful; otherwise, one of the following:

PEXBadAxis
The endpoints are coincident

Description

Invoke PEXRotateGeneral to format a matrix for a right-handed rotation about an arbitrary axis.

The rotation axis is defined by the line segment joining the two points. The angle is in radians and is measured counter-clockwise when looking from the first point to second point along the specified axis.

This utility returns unsuccessfully if the points are coincident.

Errors

None.

See Also

For a list of modeling transformation utilities, see Modeling Transformation Utilities. For a list of related topics, see PEXlib Utilities.