HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Quaternion Class Reference

#include <Types.h>

+ Inheritance diagram for Quaternion:

Public Member Functions

 Quaternion ()=default
 
 Quaternion (float x, float y, float z, float w)
 
Quaternion operator* (const Quaternion &q) const
 
Quaternion getNormalized () const
 
Matrix44 toMatrix () const
 
- Public Member Functions inherited from VectorN< Vector4, float, 4 >
 VectorN ()
 
 VectorN (Uninit)
 
 VectorN (floats)
 
 VectorN (const std::array< float, N > &arr)
 
 VectorN (const vector< float > &vec)
 
 VectorN (const float *begin, const float *end)
 
bool operator== (const Vector4 &rhs) const
 Return true if the given vector is identical to this one. More...
 
bool operator!= (const Vector4 &rhs) const
 Return true if the given vector differs from this one. More...
 
bool operator< (const Vector4 &rhs) const
 Compare two vectors lexicographically. More...
 
floatoperator[] (size_t i)
 Return the scalar value at the given index. More...
 
const floatoperator[] (size_t i) const
 Return the const scalar value at the given index. More...
 
Vector4 operator+ (const Vector4 &rhs) const
 Component-wise addition of two vectors. More...
 
VectorNoperator+= (const Vector4 &rhs)
 Component-wise addition of two vectors. More...
 
Vector4 operator- (const Vector4 &rhs) const
 Component-wise subtraction of two vectors. More...
 
Vector4 operator- () const
 Unary negation of a vector. More...
 
VectorNoperator-= (const Vector4 &rhs)
 Component-wise subtraction of two vectors. More...
 
Vector4 operator* (const Vector4 &rhs) const
 Component-wise multiplication of two vectors. More...
 
Vector4 operator* (floats) const
 Component-wise multiplication of a vector by a scalar. More...
 
VectorNoperator*= (const Vector4 &rhs)
 Component-wise multiplication of two vectors. More...
 
VectorNoperator*= (floats)
 Component-wise multiplication of a vector by a scalar. More...
 
Vector4 operator/ (const Vector4 &rhs) const
 Component-wise division of two vectors. More...
 
Vector4 operator/ (floats) const
 Component-wise division of a vector by a scalar. More...
 
VectorNoperator/= (const Vector4 &rhs)
 Component-wise division of two vectors. More...
 
VectorNoperator/= (floats)
 Component-wise division of a vector by a scalar. More...
 
float getMagnitude () const
 Return the magnitude of the vector. More...
 
Vector4 getNormalized () const
 Return a normalized vector. More...
 
float dot (const Vector4 &rhs) const
 Return the dot product of two vectors. More...
 
Iterator begin ()
 
ConstIterator begin () const
 
Iterator end ()
 
ConstIterator end () const
 
floatdata ()
 Return a pointer to the underlying data array. More...
 
const floatdata () const
 Return a const pointer to the underlying data array. More...
 

Static Public Member Functions

static Quaternion createFromAxisAngle (const Vector3 &v, float a)
 
- Static Public Member Functions inherited from VectorN< Vector4, float, 4 >
static constexpr size_t numElements ()
 Return the number of scalar elements for the vector. More...
 

Static Public Attributes

static const Quaternion IDENTITY
 

Additional Inherited Members

- Public Types inherited from VectorN< Vector4, float, 4 >
using Iterator = typename std::array< float, N >::iterator
 
using ConstIterator = typename std::array< float, N >::const_iterator
 
- Protected Attributes inherited from VectorN< Vector4, float, 4 >
std::array< float, N > _arr
 

Detailed Description

A quaternion vector

Definition at line 20 of file Types.h.

Constructor & Destructor Documentation

Quaternion::Quaternion ( )
default
Quaternion::Quaternion ( float  x,
float  y,
float  z,
float  w 
)
inline

Definition at line 25 of file Types.h.

Member Function Documentation

static Quaternion Quaternion::createFromAxisAngle ( const Vector3 v,
float  a 
)
inlinestatic

Definition at line 47 of file Types.h.

Quaternion Quaternion::getNormalized ( ) const
inline

Definition at line 41 of file Types.h.

Quaternion Quaternion::operator* ( const Quaternion q) const
inline

Definition at line 31 of file Types.h.

Matrix44 Quaternion::toMatrix ( ) const

Member Data Documentation

const Quaternion Quaternion::IDENTITY
static

Definition at line 56 of file Types.h.


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