This section describes the different ways rotation is represented in the 3ds Max SDK and the various classes used in storing and interpolating rotation.
There are several class used in 3ds Max that describe rotations in 3D space. These classes are Quat, AngAxis, and Matrix3. There are also methods that convert between these classes.
The set of all rotations in space may be visualized as:
One way to visualize this is to imagine that you could nail a dinner plate to the surface of a ball that is fixed in space (with the top surface of the plate facing the center of the ball, and the nail going from the center of the plate to the center of the sphere -- see the figure below). For each nailed position on the ball, imagine you can rotate the plate about the nail (axis). The point of placement of the nail on the ball, and the plate's rotation about it describes each of the possible rotations of the plate in a unique way.
A quaternion may be visualized in a similar way:
In the simplest terms, the rotational space described by each quaternion is a 3D unit vector plus a rotation. The Quat class has four public data members that store this information:
A normalized quaternion can represent -PI to +PI rotation -- that is -180 to 180 degrees of rotation. Quaternions use the left-hand rule for determining positive rotation.
This class is similar to a quaternion, except that a normalized quaternion only represents -PI to +PI rotation (that is -180 to 180 degrees of rotation). The AngAxis class can instead have any number of revolutions stored. It has two public data members:
Point3 axis; float angle;
The axis is similar to the values in the Quat class. The angle value can represent any rotation amount in radians.