PeriDyno 1.0.0
Loading...
Searching...
No Matches
dyno::Quat< Real > Class Template Reference

#include <Quat.h>

Public Member Functions

DYN_FUNC Quat ()
 
DYN_FUNC Quat (Real x, Real y, Real z, Real w)
 Construct a quaternion, be aware that w is the scalar part and (x, y, z) is the vector part.
 
DYN_FUNC Quat (Real rot, const Vector< Real, 3 > &axis)
 Construct a quaternion from a rotation and a unit vector.
 
DYN_FUNC Quat (const Vector< Real, 3 > u0, const Vector< Real, 3 > u1)
 
DYN_FUNC Quat (const Quat< Real > &)
 
DYN_FUNC Quat (const SquareMatrix< Real, 3 > &)
 
DYN_FUNC Quat (const SquareMatrix< Real, 4 > &)
 
DYN_FUNC Quat (const Real yaw, const Real pitch, const Real roll)
 
DYN_FUNC Quat< Real > & operator= (const Quat< Real > &)
 
DYN_FUNC Quat< Real > & operator+= (const Quat< Real > &)
 
DYN_FUNC Quat< Real > & operator-= (const Quat< Real > &)
 
DYN_FUNC Real norm () const
 
DYN_FUNC Real normSquared () const
 
DYN_FUNC Quat< Real > & normalize ()
 
DYN_FUNC Quat< Realinverse () const
 
DYN_FUNC Real angle () const
 
DYN_FUNC Real angle (const Quat< Real > &) const
 
DYN_FUNC Quat< Realconjugate () const
 
DYN_FUNC Vector< Real, 3 > rotate (const Vector< Real, 3 > &v) const
 Rotate a vector by the quaternion, guarantee the quaternion is normalized before rotating the vector.
 
DYN_FUNC void toRotationAxis (Real &rot, Vector< Real, 3 > &axis) const
 
DYN_FUNC void toEulerAngle (Real &yaw, Real &pitch, Real &roll) const
 
DYN_FUNC SquareMatrix< Real, 3 > toMatrix3x3 () const
 
DYN_FUNC SquareMatrix< Real, 4 > toMatrix4x4 () const
 
DYN_FUNC Quat< Realoperator- (const Quat< Real > &) const
 
DYN_FUNC Quat< Realoperator- (void) const
 
DYN_FUNC Quat< Realoperator+ (const Quat< Real > &) const
 
DYN_FUNC Quat< Realoperator* (const Quat< Real > &) const
 
DYN_FUNC Quat< Realoperator* (const Real &) const
 
DYN_FUNC Quat< Realoperator/ (const Real &) const
 
DYN_FUNC bool operator== (const Quat< Real > &) const
 
DYN_FUNC bool operator!= (const Quat< Real > &) const
 
DYN_FUNC Real dot (const Quat< Real > &) const
 

Static Public Member Functions

static DYN_FUNC Quat< Realidentity ()
 
static DYN_FUNC Quat< RealfromEulerAngles (const Real &yaw, const Real &pitch, const Real &roll)
 

Public Attributes

Real x
 
Real y
 
Real z
 
Real w
 

Detailed Description

template<typename Real>
class dyno::Quat< Real >

Definition at line 31 of file Quat.h.

Constructor & Destructor Documentation

◆ Quat() [1/8]

template<typename Real>
DYN_FUNC dyno::Quat< Real >::Quat ( )

Definition at line 11 of file Quat.inl.

Here is the caller graph for this function:

◆ Quat() [2/8]

template<typename Real>
DYN_FUNC dyno::Quat< Real >::Quat ( Real x,
Real y,
Real z,
Real w )

Construct a quaternion, be aware that w is the scalar part and (x, y, z) is the vector part.

Returns
DYN_FUNC

Definition at line 20 of file Quat.inl.

◆ Quat() [3/8]

template<typename Real>
DYN_FUNC dyno::Quat< Real >::Quat ( Real rot,
const Vector< Real, 3 > & axis )

Construct a quaternion from a rotation and a unit vector.

Parameters
axisshould be a unit vector
rotrotation in radian
Returns
DYN_FUNC

Definition at line 29 of file Quat.inl.

◆ Quat() [4/8]

template<typename Real>
DYN_FUNC dyno::Quat< Real >::Quat ( const Vector< Real, 3 > u0,
const Vector< Real, 3 > u1 )

Definition at line 40 of file Quat.inl.

◆ Quat() [5/8]

template<typename Real>
DYN_FUNC dyno::Quat< Real >::Quat ( const Quat< Real > & quat)

Definition at line 51 of file Quat.inl.

Here is the call graph for this function:

◆ Quat() [6/8]

template<typename Real>
DYN_FUNC dyno::Quat< Real >::Quat ( const SquareMatrix< Real, 3 > & matrix)
explicit

Definition at line 318 of file Quat.inl.

◆ Quat() [7/8]

template<typename Real>
DYN_FUNC dyno::Quat< Real >::Quat ( const SquareMatrix< Real, 4 > & matrix)
explicit

Definition at line 355 of file Quat.inl.

◆ Quat() [8/8]

template<typename Real>
DYN_FUNC dyno::Quat< Real >::Quat ( const Real yaw,
const Real pitch,
const Real roll )
explicit

Definition at line 61 of file Quat.inl.

Member Function Documentation

◆ angle() [1/2]

template<typename Real>
DYN_FUNC Real dyno::Quat< Real >::angle ( ) const

Definition at line 231 of file Quat.inl.

◆ angle() [2/2]

template<typename Real>
DYN_FUNC Real dyno::Quat< Real >::angle ( const Quat< Real > & quat) const

Definition at line 237 of file Quat.inl.

Here is the call graph for this function:

◆ conjugate()

template<typename Real>
DYN_FUNC Quat< Real > dyno::Quat< Real >::conjugate ( ) const

Definition at line 252 of file Quat.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dot()

template<typename Real>
DYN_FUNC Real dyno::Quat< Real >::dot ( const Quat< Real > & quat) const

Definition at line 246 of file Quat.inl.

Here is the call graph for this function:

◆ fromEulerAngles()

template<typename Real>
static DYN_FUNC Quat< Real > dyno::Quat< Real >::fromEulerAngles ( const Real & yaw,
const Real & pitch,
const Real & roll )
inlinestatic

Definition at line 105 of file Quat.h.

Here is the caller graph for this function:

◆ identity()

template<typename Real>
static DYN_FUNC Quat< Real > dyno::Quat< Real >::identity ( )
inlinestatic

Definition at line 104 of file Quat.h.

Here is the caller graph for this function:

◆ inverse()

template<typename Real>
DYN_FUNC Quat< Real > dyno::Quat< Real >::inverse ( ) const

Definition at line 201 of file Quat.inl.

Here is the call graph for this function:

◆ norm()

template<typename Real>
DYN_FUNC Real dyno::Quat< Real >::norm ( ) const

Definition at line 168 of file Quat.inl.

Here is the caller graph for this function:

◆ normalize()

template<typename Real>
DYN_FUNC Quat< Real > & dyno::Quat< Real >::normalize ( )

Definition at line 183 of file Quat.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ normSquared()

template<typename Real>
DYN_FUNC Real dyno::Quat< Real >::normSquared ( ) const

Definition at line 177 of file Quat.inl.

Here is the caller graph for this function:

◆ operator!=()

template<typename Real>
DYN_FUNC bool dyno::Quat< Real >::operator!= ( const Quat< Real > & quat) const

Definition at line 160 of file Quat.inl.

Here is the call graph for this function:

◆ operator*() [1/2]

template<typename Real>
DYN_FUNC Quat< Real > dyno::Quat< Real >::operator* ( const Quat< Real > & q) const

Definition at line 132 of file Quat.inl.

Here is the call graph for this function:

◆ operator*() [2/2]

template<typename Real>
DYN_FUNC Quat< Real > dyno::Quat< Real >::operator* ( const Real & scale) const

Definition at line 126 of file Quat.inl.

Here is the call graph for this function:

◆ operator+()

template<typename Real>
DYN_FUNC Quat< Real > dyno::Quat< Real >::operator+ ( const Quat< Real > & quat) const

Definition at line 120 of file Quat.inl.

Here is the call graph for this function:

◆ operator+=()

template<typename Real>
DYN_FUNC Quat< Real > & dyno::Quat< Real >::operator+= ( const Quat< Real > & quat)

Definition at line 88 of file Quat.inl.

Here is the call graph for this function:

◆ operator-() [1/2]

template<typename Real>
DYN_FUNC Quat< Real > dyno::Quat< Real >::operator- ( const Quat< Real > & quat) const

Definition at line 108 of file Quat.inl.

Here is the call graph for this function:

◆ operator-() [2/2]

template<typename Real>
DYN_FUNC Quat< Real > dyno::Quat< Real >::operator- ( void ) const

Definition at line 114 of file Quat.inl.

Here is the call graph for this function:

◆ operator-=()

template<typename Real>
DYN_FUNC Quat< Real > & dyno::Quat< Real >::operator-= ( const Quat< Real > & quat)

Definition at line 98 of file Quat.inl.

◆ operator/()

template<typename Real>
DYN_FUNC Quat< Real > dyno::Quat< Real >::operator/ ( const Real & scale) const

Definition at line 146 of file Quat.inl.

Here is the call graph for this function:

◆ operator=()

template<typename Real>
DYN_FUNC Quat< Real > & dyno::Quat< Real >::operator= ( const Quat< Real > & quat)

Definition at line 78 of file Quat.inl.

Here is the call graph for this function:

◆ operator==()

template<typename Real>
DYN_FUNC bool dyno::Quat< Real >::operator== ( const Quat< Real > & quat) const

Definition at line 152 of file Quat.inl.

Here is the call graph for this function:

◆ rotate()

template<typename Real>
DYN_FUNC Vector< Real, 3 > dyno::Quat< Real >::rotate ( const Vector< Real, 3 > & v) const

Rotate a vector by the quaternion, guarantee the quaternion is normalized before rotating the vector.

Returns
v' where (0, v') is calculate by q(0, v)q^{*}.

Definition at line 259 of file Quat.inl.

Here is the caller graph for this function:

◆ toEulerAngle()

template<typename Real>
DYN_FUNC void dyno::Quat< Real >::toEulerAngle ( Real & yaw,
Real & pitch,
Real & roll ) const

Definition at line 207 of file Quat.inl.

Here is the caller graph for this function:

◆ toMatrix3x3()

template<typename Real>
DYN_FUNC SquareMatrix< Real, 3 > dyno::Quat< Real >::toMatrix3x3 ( ) const

Definition at line 275 of file Quat.inl.

Here is the caller graph for this function:

◆ toMatrix4x4()

template<typename Real>
DYN_FUNC SquareMatrix< Real, 4 > dyno::Quat< Real >::toMatrix4x4 ( ) const

Definition at line 287 of file Quat.inl.

◆ toRotationAxis()

template<typename Real>
DYN_FUNC void dyno::Quat< Real >::toRotationAxis ( Real & rot,
Vector< Real, 3 > & axis ) const

Definition at line 392 of file Quat.inl.

Here is the caller graph for this function:

Member Data Documentation

◆ w

template<typename Real>
Real dyno::Quat< Real >::w

Definition at line 123 of file Quat.h.

◆ x

template<typename Real>
Real dyno::Quat< Real >::x

Definition at line 123 of file Quat.h.

◆ y

template<typename Real>
Real dyno::Quat< Real >::y

Definition at line 123 of file Quat.h.

◆ z

template<typename Real>
Real dyno::Quat< Real >::z

Definition at line 123 of file Quat.h.


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