All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

fcl::Quaternion3f::Quaternion3f ( )
inline

Default quaternion is identity rotation.

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

Member Function Documentation

Quaternion3f& fcl::Quaternion3f::conj ( )

conjugate

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

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

Dot product between quaternions.

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

Axes to quaternion.

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

Axis and angle to quaternion.

Referenced by fcl::ScrewMotion::deltaRotation().

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

Euler to quaternion.

void fcl::Quaternion3f::fromRotation ( const Matrix3f R)
Vec3f fcl::Quaternion3f::getColumn ( std::size_t  i) const
Vec3f fcl::Quaternion3f::getRow ( std::size_t  i) const
const FCL_REAL& fcl::Quaternion3f::getW ( ) const
inline
FCL_REAL& fcl::Quaternion3f::getW ( )
inline
const FCL_REAL& fcl::Quaternion3f::getX ( ) const
inline
FCL_REAL& fcl::Quaternion3f::getX ( )
inline
const FCL_REAL& fcl::Quaternion3f::getY ( ) const
inline
FCL_REAL& fcl::Quaternion3f::getY ( )
inline
const FCL_REAL& fcl::Quaternion3f::getZ ( ) const
inline
FCL_REAL& fcl::Quaternion3f::getZ ( )
inline
Quaternion3f& fcl::Quaternion3f::inverse ( )

inverse

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

Whether the rotation is identity.

Referenced by fcl::CollisionObject::computeAABB(), and fcl::Transform3f::isIdentity().

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

multiplication

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

scalar multiplication

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

addition

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

minus

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

division

const Quaternion3f& fcl::Quaternion3f::operator-= ( const Quaternion3f other)
bool fcl::Quaternion3f::operator== ( const Quaternion3f other) const
inline
FCL_REAL fcl::Quaternion3f::operator[] ( std::size_t  i) const
inline
void fcl::Quaternion3f::toAxes ( Vec3f  axis[3]) const

Axes to matrix.

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

Quaternion to axis and angle.

Referenced by fcl::ScrewMotion::computeScrewParameter().

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

Quaternion to Euler.

Referenced by fcl::SamplerSE3Euler::sample(), and fcl::SamplerSE3Euler_ball::sample().

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

Quaternion to matrix.