3ds Max C++ API Reference
AngAxis Class Reference

#include <quat.h>

Public Member Functions

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

Public Attributes

Point3 axis
 
float angle = 0.f
 

Detailed 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.

Constructor & Destructor Documentation

◆ AngAxis() [1/7]

AngAxis ( )
default
Remarks
Constructor. No initialization is performed.

◆ AngAxis() [2/7]

AngAxis ( const AngAxis )
default

◆ AngAxis() [3/7]

AngAxis ( AngAxis &&  )
default

◆ AngAxis() [4/7]

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.
66  {
67  axis.x = x;
68  axis.y = y;
69  axis.z = z;
70  angle = ang;
71  }
Point3 axis
Definition: quat.h:44
float angle
Definition: quat.h:45
float y
Definition: point3.h:57
float x
Definition: point3.h:56
float z
Definition: point3.h:58
controller mat max min numsubs x z controller keys x z controller keys x z
Definition: generics.inl:214
controller mat max min numsubs x z controller keys x z controller keys x
Definition: generics.inl:212

◆ AngAxis() [5/7]

AngAxis ( const Point3 axis,
float  angle 
)
inline
Remarks
Constructor. Data members are initialized to the specified values.
75  {
76  this->axis = axis;
77  this->angle = angle;
78  }

◆ AngAxis() [6/7]

AngAxis ( const Quat q)
Remarks
Constructor. Data members are initialized equal to the specified Quat.

◆ AngAxis() [7/7]

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

◆ operator=() [1/2]

AngAxis& operator= ( const AngAxis )
default

◆ operator=() [2/2]

AngAxis& operator= ( AngAxis &&  )
default

◆ Set() [1/4]

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.
101  {
102  axis.x = x;
103  axis.y = y;
104  axis.z = z;
105  angle = ang;
106  return *this;
107  }

◆ Set() [2/4]

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.
116  {
117  axis = ax;
118  angle = ang;
119  return *this;
120  }

◆ Set() [3/4]

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.

◆ Set() [4/4]

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.

◆ GetNumRevs()

int GetNumRevs ( )
Remarks
Returns the number of revolutions represented by the angle. This returns int(angle/TWOPI);

◆ SetNumRevs()

void SetNumRevs ( int  num)
Remarks
Sets the number of revolution to num. This modifies angle: angle += float(num)*TWOPI;

Member Data Documentation

◆ axis

Point3 axis

◆ angle

float angle = 0.f