Simulant  21.12-166
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
smlt::Quaternion Struct Reference

Public Member Functions

 Quaternion (const Degrees &pitch, const Degrees &yaw, const Degrees &roll)
 Quaternion (const Vec3 &axis, const Degrees &degrees)
 Quaternion (const Mat3 &rot_matrix)
 Quaternion (const Euler &angles)
 Quaternion (float x, float y, float z, float w)
Euler to_euler () const
AxisAngle to_axis_angle () const
float length_squared () const
float length () const
void normalize ()
const Quaternion normalized ()
Quaternion conjugated ()
float dot (const Quaternion &rhs) const __attribute__((always_inline))
void inverse ()
const Quaternion inversed () const
bool equals (const Quaternion &rhs) const
bool operator== (const Quaternion &rhs) const
bool operator!= (const Quaternion &rhs) const
Quaternionoperator*= (const Quaternion &rhs)
Quaternion operator* (const Quaternion &rhs) const
Quaternionoperator+= (const Quaternion &rhs)
Quaternion operator+ (const Quaternion &rhs) const
Quaternionoperator*= (const float rhs)
Quaternion operator* (const float rhs) const
Quaternion operator/ (const float rhs) const
Vec3 axis () const
Radians angle () const
Quaternion operator- () const
Quaternion nlerp (const Quaternion &rhs, float t) const
Quaternion slerp (const Quaternion &rhs, float t) const
const Degrees pitch () const
const Degrees yaw () const
const Degrees roll () const
Vec3 forward () const
Vec3 up () const
Vec3 right () const

Static Public Member Functions

static Quaternion look_rotation (const Vec3 &direction, const Vec3 &up=Vec3(0, 1, 0))

Public Attributes

float x
float y
float z
float w


struct Vec3
struct Mat4
struct Mat3

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