RenderWare V2.1

Previous Page Index Next Page

RwMatrix4d *

RwRotateMatrixCos(RwMatrix4d *matrix, RwReal rx, RwReal ry,
RwReal rz, RwReal cosangle, RwReal rotdir,
RwCombineOperation op);

Description

Builds a rotation matrix and applies it to matrix. The angle of rotation is given by the cosine of the angle (cosangle) and a direction of rotation (rotdir). The operation may be a pre-concatenation, post-concatenation, or replacement.

Arguments

matrix Pointer to the matrix.

rx X component of the axis of rotation.

ry Y component of the axis of rotation.

rz Z component of the axis of rotation.

cosangle Cosine of the angle of rotation

rotdir Direction of rotation (a positive value specifies anti-clockwise rotation and a negative value specifies clockwise rotation).

op Combination operator.

Return Value

The argument matrix if successful, and NULL otherwise.

Comments

This function should be used in preference to RwRotateMatrix() when the cosine of the angle of rotation is known. In such cases RwRotateMatrixCos() is more efficient than RwRotateMatrix().

See Also

RwIdentityMatrix()

RwInvertMatrix()

RwMultiplyMatrix()

RwOrthoNormalizeMatrix()

RwQueryRotateMatrix()

RwRotateCTM()

RwRotateJointTM()

RwRotateMatrix()

RwScaleMatrix()

RwTransformMatrix()

RwTranslateMatrix()