Public Member Functions | List of all members
fcl::Quaternion3f Class Reference

Quaternion used locally by InterpMotion. More...

#include <hpp/fcl/math/transform.h>

Public Member Functions

 Quaternion3f ()
 Default quaternion is identity rotation. More...
 
 Quaternion3f (FCL_REAL a, FCL_REAL b, FCL_REAL c, FCL_REAL d)
 
bool isIdentity () const
 Whether the rotation is identity. More...
 
void fromRotation (const Matrix3f &R)
 Matrix to quaternion. More...
 
void toRotation (Matrix3f &R) const
 Quaternion to matrix. More...
 
void fromEuler (FCL_REAL a, FCL_REAL b, FCL_REAL c)
 Euler to quaternion. More...
 
void toEuler (FCL_REAL &a, FCL_REAL &b, FCL_REAL &c) const
 Quaternion to Euler. More...
 
void fromAxes (const Vec3f axis[3])
 Axes to quaternion. More...
 
void toAxes (Vec3f axis[3]) const
 Axes to matrix. More...
 
void fromAxisAngle (const Vec3f &axis, FCL_REAL angle)
 Axis and angle to quaternion. More...
 
void toAxisAngle (Vec3f &axis, FCL_REAL &angle) const
 Quaternion to axis and angle. More...
 
FCL_REAL dot (const Quaternion3f &other) const
 Dot product between quaternions. More...
 
Quaternion3f operator+ (const Quaternion3f &other) const
 addition More...
 
const Quaternion3foperator+= (const Quaternion3f &other)
 
Quaternion3f operator- (const Quaternion3f &other) const
 minus More...
 
const Quaternion3foperator-= (const Quaternion3f &other)
 
Quaternion3f operator* (const Quaternion3f &other) const
 multiplication More...
 
const Quaternion3foperator*= (const Quaternion3f &other)
 
Quaternion3f operator- () const
 division More...
 
Quaternion3f operator* (FCL_REAL t) const
 scalar multiplication More...
 
const Quaternion3foperator*= (FCL_REAL t)
 
Quaternion3fconj ()
 conjugate More...
 
Quaternion3finverse ()
 inverse More...
 
Vec3f transform (const Vec3f &v) const
 rotate a vector More...
 
const FCL_REALgetW () const
 
const FCL_REALgetX () const
 
const FCL_REALgetY () const
 
const FCL_REALgetZ () const
 
FCL_REALgetW ()
 
FCL_REALgetX ()
 
FCL_REALgetY ()
 
FCL_REALgetZ ()
 
Vec3f getColumn (std::size_t i) const
 
Vec3f getRow (std::size_t i) const
 
bool operator== (const Quaternion3f &other) const
 
bool operator!= (const Quaternion3f &other) const
 
FCL_REAL operator[] (std::size_t i) const
 

Detailed Description

Quaternion used locally by InterpMotion.

Constructor & Destructor Documentation

◆ Quaternion3f() [1/2]

fcl::Quaternion3f::Quaternion3f ( )
inline

Default quaternion is identity rotation.

Referenced by fcl::Transform3f::setIdentity().

◆ Quaternion3f() [2/2]

fcl::Quaternion3f::Quaternion3f ( FCL_REAL  a,
FCL_REAL  b,
FCL_REAL  c,
FCL_REAL  d 
)
inline

References d().

Member Function Documentation

◆ conj()

Quaternion3f& fcl::Quaternion3f::conj ( )

conjugate

Referenced by fcl::Transform3f::inverse(), isIdentity(), and operator[]().

◆ dot()

FCL_REAL fcl::Quaternion3f::dot ( const Quaternion3f other) const

Dot product between quaternions.

Referenced by isIdentity().

◆ fromAxes()

void fcl::Quaternion3f::fromAxes ( const Vec3f  axis[3])

Axes to quaternion.

Referenced by isIdentity().

◆ fromAxisAngle()

void fcl::Quaternion3f::fromAxisAngle ( const Vec3f axis,
FCL_REAL  angle 
)

Axis and angle to quaternion.

Referenced by fcl::ScrewMotion::deltaRotation(), and isIdentity().

◆ fromEuler()

void fcl::Quaternion3f::fromEuler ( FCL_REAL  a,
FCL_REAL  b,
FCL_REAL  c 
)

Euler to quaternion.

Referenced by isIdentity().

◆ fromRotation()

void fcl::Quaternion3f::fromRotation ( const Matrix3f R)

◆ getColumn()

Vec3f fcl::Quaternion3f::getColumn ( std::size_t  i) const

Referenced by getZ().

◆ getRow()

Vec3f fcl::Quaternion3f::getRow ( std::size_t  i) const

Referenced by getZ().

◆ getW() [1/2]

const FCL_REAL& fcl::Quaternion3f::getW ( ) const
inline

◆ getW() [2/2]

FCL_REAL& fcl::Quaternion3f::getW ( )
inline

◆ getX() [1/2]

const FCL_REAL& fcl::Quaternion3f::getX ( ) const
inline

◆ getX() [2/2]

FCL_REAL& fcl::Quaternion3f::getX ( )
inline

◆ getY() [1/2]

const FCL_REAL& fcl::Quaternion3f::getY ( ) const
inline

◆ getY() [2/2]

FCL_REAL& fcl::Quaternion3f::getY ( )
inline

◆ getZ() [1/2]

const FCL_REAL& fcl::Quaternion3f::getZ ( ) const
inline

◆ getZ() [2/2]

FCL_REAL& fcl::Quaternion3f::getZ ( )
inline

References getColumn(), and getRow().

◆ inverse()

Quaternion3f& fcl::Quaternion3f::inverse ( )

◆ isIdentity()

bool fcl::Quaternion3f::isIdentity ( ) const
inline

◆ operator!=()

bool fcl::Quaternion3f::operator!= ( const Quaternion3f other) const
inline

◆ operator*() [1/2]

Quaternion3f fcl::Quaternion3f::operator* ( const Quaternion3f other) const

multiplication

Referenced by isIdentity().

◆ operator*() [2/2]

Quaternion3f fcl::Quaternion3f::operator* ( FCL_REAL  t) const

scalar multiplication

◆ operator*=() [1/2]

const Quaternion3f& fcl::Quaternion3f::operator*= ( const Quaternion3f other)

Referenced by isIdentity().

◆ operator*=() [2/2]

const Quaternion3f& fcl::Quaternion3f::operator*= ( FCL_REAL  t)

◆ operator+()

Quaternion3f fcl::Quaternion3f::operator+ ( const Quaternion3f other) const

addition

Referenced by isIdentity().

◆ operator+=()

const Quaternion3f& fcl::Quaternion3f::operator+= ( const Quaternion3f other)

Referenced by isIdentity().

◆ operator-() [1/2]

Quaternion3f fcl::Quaternion3f::operator- ( const Quaternion3f other) const

minus

◆ operator-() [2/2]

Quaternion3f fcl::Quaternion3f::operator- ( ) const

division

Referenced by isIdentity().

◆ operator-=()

const Quaternion3f& fcl::Quaternion3f::operator-= ( const Quaternion3f other)

Referenced by isIdentity().

◆ operator==()

bool fcl::Quaternion3f::operator== ( const Quaternion3f other) const
inline

◆ operator[]()

FCL_REAL fcl::Quaternion3f::operator[] ( std::size_t  i) const
inline

References conj(), and inverse().

◆ toAxes()

void fcl::Quaternion3f::toAxes ( Vec3f  axis[3]) const

Axes to matrix.

Referenced by isIdentity().

◆ toAxisAngle()

void fcl::Quaternion3f::toAxisAngle ( Vec3f axis,
FCL_REAL angle 
) const

Quaternion to axis and angle.

Referenced by fcl::ScrewMotion::computeScrewParameter(), and isIdentity().

◆ toEuler()

void fcl::Quaternion3f::toEuler ( FCL_REAL a,
FCL_REAL b,
FCL_REAL c 
) const

◆ toRotation()

void fcl::Quaternion3f::toRotation ( Matrix3f R) const

Quaternion to matrix.

Referenced by isIdentity().

◆ transform()

Vec3f fcl::Quaternion3f::transform ( const Vec3f v) const