AngAxis Class Reference

#include <quat.h>

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.
+ Inheritance diagram for AngAxis:

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)
 
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
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 

Constructor & Destructor Documentation

AngAxis ( )
inline
Remarks
Constructor. No initialization is performed.
48 { /* 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.
60  { axis.x = x; axis.y = y; axis.z = z; angle = ang; }
Point3 axis
Definition: quat.h:44
controller mat max min numsubs x z controller keys x z controller keys x
Definition: generics.inl:211
float y
Definition: point3.h:55
float z
Definition: point3.h:55
float x
Definition: point3.h:55
controller mat max min numsubs x z controller keys x z controller keys x z
Definition: generics.inl:213
float angle
Definition: quat.h:45
AngAxis ( const Point3 axis,
float  angle 
)
inline
Remarks
Constructor. Data members are initialized to the specified values.
63 { this->axis=axis; this->angle=angle; }
Point3 axis
Definition: quat.h:44
float angle
Definition: quat.h:45
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.
86  {axis.x = x; axis.y = y; axis.z = z; angle = ang; return *this; }
Point3 axis
Definition: quat.h:44
controller mat max min numsubs x z controller keys x z controller keys x
Definition: generics.inl:211
float y
Definition: point3.h:55
float z
Definition: point3.h:55
float x
Definition: point3.h:55
controller mat max min numsubs x z controller keys x z controller keys x z
Definition: generics.inl:213
float angle
Definition: quat.h:45
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.
95  {axis = ax; angle = ang; return *this; }
Point3 axis
Definition: quat.h:44
float angle
Definition: quat.h:45
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

Point3 axis
float angle