Osiris Framework  0.3
OQuaternion Class Reference

Represents quaternions. More...

#include <OsirisSDK/OMath.h>

Inheritance diagram for OQuaternion:
OMathPrimitive< glm::quat >

Public Member Functions

 OQuaternion ()
 Class constructor.
 
 OQuaternion (const OQuaternion &in)
 Class copy constructor.
 
 OQuaternion (float x, float y, float z, float w)
 Class constructor, based on the quaternion components.
 
 OQuaternion (OVector3 rotationAxis, float angle)
 Class constructor for a 3D rotation quaternion. More...
 
 OQuaternion (OVector3 eulerAngles)
 Class constructor based on the Euler angles for object orientation. More...
 
 OQuaternion (const OMathPrimitive< glm::quat > &in)
 Copy constructor for the base template class.
 
virtual ~OQuaternion ()
 Class destructor.
 
OVector3 operator* (const OVector3 &in) const
 Quaternion product operator overload for three-dimentional vectors.
 
OQuaternion operator* (const OQuaternion &in) const
 
OMatrix4x4 toMatrix4 () const
 Conversion to 4x4 rotation matrix.
 
OVector3 toEulerAngles () const
 Conversion to a three-dimensional vector containing Euler angles.
 
OQuaternion inverse () const
 Calculate the inverse quaternion.
 
void rotate (const OVector3 &rotationAxis, float rotationAngle)
 Rotate the quaternion around an axis. More...
 
- Public Member Functions inherited from OMathPrimitive< glm::quat >
 OMathPrimitive ()
 Class constructor.
 
 OMathPrimitive (const OMathPrimitive< glm::quat > &in)
 Copy constructor.
 
virtual ~OMathPrimitive ()
 Class destructor.
 
OMathPrimitive< glm::quat > normalize ()
 Creates a normalized object out of the current one.
 
OMathPrimitive< glm::quat > & operator= (const OMathPrimitive< glm::quat > &in)
 
OMathPrimitive< glm::quat > & operator*= (const OMathPrimitive< glm::quat > &in)
 
OMathPrimitive< glm::quat > & operator*= (float x)
 
OMathPrimitive< glm::quat > operator* (const OMathPrimitive< glm::quat > &in) const
 
virtual OMathPrimitive< glm::quat > operator* (float x) const
 
OMathPrimitive< glm::quat > & operator+= (const OMathPrimitive< glm::quat > &in)
 
OMathPrimitive< glm::quat > operator+ (const OMathPrimitive< glm::quat > &in) const
 
OMathPrimitive< glm::quat > & operator-= (const OMathPrimitive< glm::quat > &in)
 
OMathPrimitive< glm::quat > operator- (const OMathPrimitive< glm::quat > &in) const
 
bool operator== (const OMathPrimitive< glm::quat > &in) const
 
bool operator!= (const OMathPrimitive< glm::quat > &in) const
 
const GLfloat * glArea () const
 Returns a pointer to the memory area to be used by OpenGL. For internal library usage only.
 

Additional Inherited Members

- Protected Attributes inherited from OMathPrimitive< glm::quat >
glm::quat _glmInternal
 

Detailed Description

Represents quaternions.

Constructor & Destructor Documentation

OQuaternion::OQuaternion ( OVector3  rotationAxis,
float  angle 
)

Class constructor for a 3D rotation quaternion.

Parameters
rotationAxisRotation axis.
angleThe angle of rotation in degrees.
OQuaternion::OQuaternion ( OVector3  eulerAngles)

Class constructor based on the Euler angles for object orientation.

eulerAngles Euler orientation angles (pitch, roll and yaw).

Member Function Documentation

void OQuaternion::rotate ( const OVector3 rotationAxis,
float  rotationAngle 
)

Rotate the quaternion around an axis.

Parameters
rotationAxisRotation axis.
rotationAngleThe angle of rotation in degrees.

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