Kindr
Kinematics and Dynamics for Robotics
kindr::QuaternionBase< Derived_ > Class Template Reference

Base class that defines the interface of a quaternion This class defines a generic interface for a quaternion. More...

#include <QuaternionBase.hpp>

Inheritance diagram for kindr::QuaternionBase< Derived_ >:
Inheritance graph

Public Member Functions

Derived_ & invert ()
 inverts the quaternion More...
 
Derived_ inverted () const
 gets the inverse of the quaternion More...
 
Derived_ & conjugate ()
 conjugates the quaternion More...
 
Derived_ conjugated () const
 gets the conjugate of the quaternion More...
 
 operator Derived_ & ()
 gets the derived quaternion (only for advanced users) More...
 
 operator const Derived_ & () const
 gets the derived quaternion (only for advanced users) More...
 
Derived_ & derived ()
 gets the derived quaternion (only for advanced users) More...
 
const Derived_ & derived () const
 gets the derived quaternion (only for advanced users) More...
 
template<typename OtherDerived_ >
Derived_ operator* (const QuaternionBase< OtherDerived_ > &other) const
 multiplies the quaternion with another quaternion More...
 
template<typename OtherDerived_ >
bool operator== (const QuaternionBase< OtherDerived_ > &other) const
 compares the quaternion with another quaternion More...
 

Friends

std::ostream & operator<< (std::ostream &out, const QuaternionBase< Derived_ > &quat)
 prints the coefficients of the quaternion More...
 

Detailed Description

template<typename Derived_>
class kindr::QuaternionBase< Derived_ >

Base class that defines the interface of a quaternion This class defines a generic interface for a quaternion.

Template Parameters
Derived_the derived class that should implement the quaternion
See also
rm::rotations::RotationQuaternionBase for Quaternions that represent a rotation

Definition at line 76 of file QuaternionBase.hpp.

Member Function Documentation

◆ conjugate()

template<typename Derived_>
Derived_& kindr::QuaternionBase< Derived_ >::conjugate ( )

conjugates the quaternion

Returns
the conjugate of the quaternion

◆ conjugated()

template<typename Derived_>
Derived_ kindr::QuaternionBase< Derived_ >::conjugated ( ) const

gets the conjugate of the quaternion

Returns
the conjugate of the quaternion

◆ derived() [1/2]

template<typename Derived_>
Derived_& kindr::QuaternionBase< Derived_ >::derived ( )
inline

gets the derived quaternion (only for advanced users)

Returns
the derived quaternion

Definition at line 117 of file QuaternionBase.hpp.

◆ derived() [2/2]

template<typename Derived_>
const Derived_& kindr::QuaternionBase< Derived_ >::derived ( ) const
inline

gets the derived quaternion (only for advanced users)

Returns
the derived quaternion

Definition at line 124 of file QuaternionBase.hpp.

◆ invert()

template<typename Derived_>
Derived_& kindr::QuaternionBase< Derived_ >::invert ( )

inverts the quaternion

Returns
the inverted quaternion

◆ inverted()

template<typename Derived_>
Derived_ kindr::QuaternionBase< Derived_ >::inverted ( ) const

gets the inverse of the quaternion

Returns
the inverse of the quaternion

◆ operator const Derived_ &()

template<typename Derived_>
kindr::QuaternionBase< Derived_ >::operator const Derived_ & ( ) const
inline

gets the derived quaternion (only for advanced users)

Returns
the derived quaternion

Definition at line 110 of file QuaternionBase.hpp.

◆ operator Derived_ &()

template<typename Derived_>
kindr::QuaternionBase< Derived_ >::operator Derived_ & ( )
inline

gets the derived quaternion (only for advanced users)

Returns
the derived quaternion

Definition at line 102 of file QuaternionBase.hpp.

◆ operator*()

template<typename Derived_>
template<typename OtherDerived_ >
Derived_ kindr::QuaternionBase< Derived_ >::operator* ( const QuaternionBase< OtherDerived_ > &  other) const
inline

multiplies the quaternion with another quaternion

Returns
the product of two quaternions
Parameters
otherother other quaternion

Definition at line 133 of file QuaternionBase.hpp.

◆ operator==()

template<typename Derived_>
template<typename OtherDerived_ >
bool kindr::QuaternionBase< Derived_ >::operator== ( const QuaternionBase< OtherDerived_ > &  other) const
inline

compares the quaternion with another quaternion

Parameters
otherother quaternion
Returns
true if the quaternions are equal

Definition at line 147 of file QuaternionBase.hpp.

Friends And Related Function Documentation

◆ operator<<

template<typename Derived_>
std::ostream& operator<< ( std::ostream &  out,
const QuaternionBase< Derived_ > &  quat 
)
friend

prints the coefficients of the quaternion

Returns
w x y z

Definition at line 154 of file QuaternionBase.hpp.


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