AngAxis Class Reference
 
 
 
AngAxis Class Reference

This reference page is linked to from the following overview topics: Rotation Concepts, Keyframe Data Access Classes and Methods.


#include <quat.h>

Inheritance diagram for AngAxis:
MaxHeapOperators

Class Description

See also:
Class Quat, Class Point3.

Description:
This class provides a representation for orientation in three space using an angle and axis. This class is similar to a quaternion, except that a normalized quaternion only represents -PI to +PI rotation. This class will have the number of revolutions stored. All methods of this class are implemented by the system.

The rotation convention in the 3ds Max API is the left-hand-rule. Note that this is different from the right-hand-rule used in the 3ds Max user interface.
Data Members:
Point3 axis;

The axis of rotation.

float angle;

The angle of rotation about the axis in radians. This angle is left handed.

Public Member Functions

  AngAxis ()
  AngAxis (float x, float y, float z, float ang)
  AngAxis (const Point3 &axis, float angle)
  AngAxis (const Quat &q)
  AngAxis (const Matrix3 &m)
AngAxis Set (float x, float y, float z, float ang)
AngAxis Set (const Point3 &ax, float ang)
AngAxis Set (const Quat &q)
AngAxis Set (const Matrix3 &m)
int  GetNumRevs ()
void  SetNumRevs (int num)

Public Attributes

Point3  axis
float  angle

Constructor & Destructor Documentation

AngAxis ( ) [inline]
Remarks:
Constructor. No initialization is performed.
{ /* NO INIT */ }
AngAxis ( float  x,
float  y,
float  z,
float  ang 
) [inline]
Remarks:
Constructor. The AngAxis is initialized from the specified values.
Parameters:
float x

The x component of the axis.

float y

The y component of the axis.

float z

The z component of the axis.

float ang

The angle component in radians.
      { axis.x = x; axis.y = y; axis.z = z; angle = ang; }
AngAxis ( const Point3 axis,
float  angle 
) [inline]
Remarks:
Constructor. Data members are initialized to the specified values.
{ this->axis=axis; this->angle=angle; }  
AngAxis ( const Quat q )
Remarks:
Constructor. Data members are initialized equal to the specified Quat.
AngAxis ( const Matrix3 m )
Remarks:
Constructor. The AngAxis is initialized with the rotation from the specified matrix.
Parameters:
const Matrix3& m

The rotation used to initialize the AngAxis.

Member Function Documentation

AngAxis& Set ( float  x,
float  y,
float  z,
float  ang 
) [inline]
Remarks:
Sets the angle and axis to the specified values.
Parameters:
float x

Specifies the x component of the axis.

float y

Specifies the xycomponent of the axis.

float z

Specifies the z component of the axis.

float ang

Specifies the angle to set in radians.
Returns:
A reference to this AngAxis.
      {axis.x = x; axis.y = y; axis.z = z; angle = ang; return *this; }
AngAxis& Set ( const Point3 ax,
float  ang 
) [inline]
Remarks:
Sets the angle and axis to the specified values.
Parameters:
const Point3& ax

Specifies the axis to set.

float ang

Specifies the angle to set in radians.
Returns:
A reference to this AngAxis.
      {axis = ax; angle = ang; return *this; }
AngAxis& Set ( const Quat q )
Remarks:
Sets the angle and axis based on the rotations from the specified quaternion.
Parameters:
const Quat& q

Specifies the angle and axis to use.
Returns:
A reference to this AngAxis.
AngAxis& Set ( const Matrix3 m )
Remarks:
Sets the angle and axis based on the rotations from the specified matrix.
Parameters:
const Matrix3& m

Specifies the angle and axis to use.
Returns:
A reference to this AngAxis.
int GetNumRevs ( )
Remarks:
Returns the number of revolutions represented by the angle. This returns int(angle/TWOPI);
void SetNumRevs ( int  num )
Remarks:
Sets the number of revolution to num. This modifies angle: angle += float(num)*TWOPI;

Member Data Documentation