Rotation Concepts
 
 
 

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 Visualization of Rotation Space

The set of all rotations in space may be visualized as:

  1. The set of all unit length axis vectors with one endpoint centered at the sphere center (0,0,0) and the other endpoint on the surface of the unit sphere.
  2. The set of rotations about each vector axis (rotations about the radius vectors that point to each endpoint on the sphere).

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.

Unit sphere with axis and plate shown.

Quaternion Representation of Rotation

A quaternion may be visualized in a similar way:

  1. An arbitrary unit length axis vector (one of the endpoints on the unit sphere...or the nail position).
  2. A rotation about the axis (one on the rotations about the radius vectors that point to each endpoint on the sphere).

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:

float x, y, z, w;

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.

AngAxis Representation of 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.

See Also