C4 Engine Terathon Software C4 Engine API Documentation

• Math Library

API Links
Developer Links

Transform4D::SetRotationAboutAxis

Defined in:  C4Matrix4D.h
Sets a matrix to represent a rotation about a given axis.
Prototype

Transform4D& SetRotationAboutAxis(float angle, const Vector3D& axis);

Parameters
angle The angle through which to rotate, in radians.
axis The axis about which to rotate. This vector should have unit length.
Description
The SetRotationAboutAxis function replaces all entries of a matrix with those representing a rotation about the axis given by the axis parameter through the angle given by the angle parameter. The entries of the fourth row and fourth column of the matrix are set to those of the identity matrix.

The return value is a reference to the matrix object.
See Also

Transform4D::SetRotationAboutX

Transform4D::SetRotationAboutY

Transform4D::SetRotationAboutZ