clan::Quaternionf Class Reference

Quaternion - Float. More...

#include <quaternion.h>

+ Inheritance diagram for clan::Quaternionf:

Public Member Functions

 Quaternionf ()
 
 Quaternionf (const Quaternionx< float > &copy)
 
 Quaternionf (const Mat4< float > &rotation_matrix)
 
 Quaternionf (float real, float i, float j, float k)
 
 Quaternionf (float real, const Vec3< float > &imag)
 
 Quaternionf (float euler_x, float euler_y, float euler_z, AngleUnit unit, EulerOrder order)
 
 Quaternionf (const Vec3< float > &euler, AngleUnit unit, EulerOrder order)
 
 Quaternionf (const Angle &euler_x, const Angle &euler_y, const Angle &euler_z, EulerOrder order)
 
- Public Member Functions inherited from clan::Quaternionx< float >
 Quaternionx ()
 
 Quaternionx (floatreal, floati, floatj, floatk)
 
 Quaternionx (floatreal, const Vec3< float > &imag)
 
 Quaternionx (const Quaternionx< float > &copy)
 
 Quaternionx (floateuler_x, floateuler_y, floateuler_z, AngleUnit unit, EulerOrder order)
 
 Quaternionx (const Vec3< float > &euler, AngleUnit unit, EulerOrder order)
 
 Quaternionx (const Angle &euler_x, const Angle &euler_y, const Angle &euler_z, EulerOrder order)
 
 Quaternionx (const Mat4< float > &rotation_matrix)
 
Quaternionx< float > & inverse ()
 Inverse this quaternion. More...
 
float magnitude () const
 Get the quaternion magnitude. More...
 
Quaternionx< float > & normalize ()
 Normalizes this quaternion. More...
 
bool operator!= (const Quaternionx< float > &other) const
 Not equal operator. More...
 
Quaternionx< float > operator* (const Quaternionx< float > &mult) const
 Multiplication operator. More...
 
Quaternionx< float > operator* (const Mat4< float > &matrix) const
 
bool operator< (const Quaternionx< float > &other) const
 Less operator. More...
 
bool operator<= (const Quaternionx< float > &other) const
 Less equal operator. More...
 
bool operator== (const Quaternionx< float > &other) const
 Equal operator. More...
 
bool operator> (const Quaternionx< float > &other) const
 Greater operator. More...
 
bool operator>= (const Quaternionx< float > &other) const
 Greater equal operator. More...
 
Quaternionx< float > & rotate (const Angle &angle, const Vec3f &axis)
 
Quaternionx< float > & rotate (const Angle &euler_x, const Angle &euler_y, const Angle &euler_z, EulerOrder order)
 
Vec3< float > rotate_vector (const Vec3< float > &v) const
 Rotates vector by this quaternion. More...
 
Vec4< float > rotate_vector (const Vec4< float > &v) const
 
void set (floateuler_x, floateuler_y, floateuler_z, AngleUnit unit, EulerOrder order)
 
void set (const Vec3< float > &euler, AngleUnit unit, EulerOrder order)
 
void set (const Angle &euler_x, const Angle &euler_y, const Angle &euler_z, EulerOrder order)
 
Mat4< float > to_matrix () const
 Convert the quaternion to a rotation matrix. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from clan::Quaternionx< float >
static Quaternionx< float > axis_angle (const Angle &angle, const Vec3f &axis)
 
static Quaternionx< float > inverse (Quaternionx< float > q)
 Inverse this quaternion. More...
 
static Quaternionx< float > lerp (const Quaternionx< float > &quaternion_initial, const Quaternionx< float > &quaternion_final, floatlerp_time)
 Linear Quaternion Interpolation. More...
 
static Quaternionx< float > multiply (const Quaternionx< float > &quaternion_1, const Quaternionx< float > &quaternion_2)
 
static Quaternionx< float > normalize (Quaternionx< float > q)
 Normalizes this quaternion. More...
 
static Quaternionx< float > rotation_between (Vec3< float > v0, Vec3< float > v1)
 Calculates the shortest arc quaternion between two vectors. More...
 
static Quaternionx< float > rotation_between (Vec4< float > v0, Vec4< float > v1)
 Calculates the shortest arc quaternion between two vectors. More...
 
static Quaternionx< float > slerp (const Quaternionx< float > &quaternion_initial, const Quaternionx< float > &quaternion_final, floatslerp_time)
 Spherical Quaternion Interpolation. More...
 
- Public Attributes inherited from clan::Quaternionx< float >
union {
   Type   i
 
   Type   x
 
}; 
 The imaginary vector part. More...
 
union {
   Type   j
 
   Type   y
 
}; 
 
union {
   Type   k
 
   Type   z
 
}; 
 
float i
 
float j
 
float k
 
float w
 The real scalar part. More...
 
float x
 
float y
 
float z
 

Detailed Description

Quaternion - Float.

Constructor & Destructor Documentation

clan::Quaternionf::Quaternionf ( )
inline
clan::Quaternionf::Quaternionf ( const Quaternionx< float > &  copy)
inline
clan::Quaternionf::Quaternionf ( const Mat4< float > &  rotation_matrix)
inlineexplicit
clan::Quaternionf::Quaternionf ( float  real,
float  i,
float  j,
float  k 
)
inlineexplicit
clan::Quaternionf::Quaternionf ( float  real,
const Vec3< float > &  imag 
)
inlineexplicit
clan::Quaternionf::Quaternionf ( float  euler_x,
float  euler_y,
float  euler_z,
AngleUnit  unit,
EulerOrder  order 
)
inlineexplicit
clan::Quaternionf::Quaternionf ( const Vec3< float > &  euler,
AngleUnit  unit,
EulerOrder  order 
)
inlineexplicit
clan::Quaternionf::Quaternionf ( const Angle euler_x,
const Angle euler_y,
const Angle euler_z,
EulerOrder  order 
)
inlineexplicit

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