Ravelin
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
AANGLE Class Reference

Class for representation of orientation by an angle around an axis. More...

#include <AAngle.h>

Public Member Functions

 AANGLE ()
 Default constructor.
 
 AANGLE (const AANGLE &source)
 
 AANGLE (REAL x, REAL y, REAL z, REAL angle)
 Constructs an axis-angle object from four REAL values.
 
 AANGLE (const VECTOR3 &v, REAL angle)
 Constructs an axis-angle object from a vector and a REAL value.
 
 AANGLE (const ORIGIN3 &v, REAL angle)
 Constructs an axis-angle object from a vector and a REAL value.
 
 AANGLE (const MATRIX3 &m)
 Constructs an axis-angle object from a 3x3 rotation matrix.
 
 AANGLE (const QUAT &q)
 Copy constructor.
 
 AANGLE (const MATRIX3 &m, const VECTOR3 &axis)
 Constructs an axis-angle object from a 3x3 rotation matrix and a desired axis.
 
AANGLEset (const VECTOR3 &v, REAL angle)
 Sets this object from a three-dimensional vector and a REAL value. More...
 
AANGLEset (const ORIGIN3 &v, REAL angle)
 Sets this object from a three-dimensional vector and a REAL value. More...
 
AANGLEoperator= (const MATRIX3 &m)
 Sets the object from a rotation matrix.
 
AANGLEoperator= (const QUAT &q)
 Sets axis angle from unit quaternion. More...
 
AANGLEoperator= (const AANGLE &source)
 Copies a axis-angle object.
 
void set (const MATRIX3 &m, const VECTOR3 &axis)
 Sets the object from a rotation matrix and rotation axis. More...
 
AANGLE operator* (const AANGLE &a) const
 Multiplies two axis-angle representations. More...
 
AANGLEoperator*= (const AANGLE &a)
 Multiplies this axis-angle representation by another and stores the result in this More...
 

Static Public Member Functions

static REAL safe_sqrt (REAL x)
 Does a "safe" square root - input values sufficiently close to -0 are returned as 0.
 

Public Attributes

REAL angle
 
REAL x
 
REAL y
 
REAL z
 

Detailed Description

Class for representation of orientation by an angle around an axis.

Member Function Documentation

AANGLE AANGLE::operator* ( const AANGLE a) const

Multiplies two axis-angle representations.

This has the effect of performing a rotation by a, then performing a rotation by this.

References AANGLE().

AANGLE & AANGLE::operator*= ( const AANGLE a)

Multiplies this axis-angle representation by another and stores the result in this

This has the effect of performing a rotation by a, then performing a rotation by this.

AANGLE & AANGLE::operator= ( const QUAT q)

Sets axis angle from unit quaternion.

Todo:
test this method

References QUAT::normalize(), safe_sqrt(), QUAT::w, QUAT::x, QUAT::y, and QUAT::z.

AANGLE & AANGLE::set ( const VECTOR3 v,
REAL  angle 
)

Sets this object from a three-dimensional vector and a REAL value.

Note
automatically normalizes the axis

Referenced by AANGLE().

AANGLE & AANGLE::set ( const ORIGIN3 v,
REAL  angle 
)

Sets this object from a three-dimensional vector and a REAL value.

Note
automatically normalizes the axis
void AANGLE::set ( const MATRIX3 m,
const VECTOR3 axis 
)

Sets the object from a rotation matrix and rotation axis.

Note
automatically normalizes the axis

References VECTOR3::pose, and safe_sqrt().


The documentation for this class was generated from the following files: