Public Member Functions | Private Attributes | Static Private Attributes | List of all members
vpQuaternionVector Class Reference

Defines a quaternion and its basic operations. More...

#include <vpQuaternionVector.h>

Inheritance diagram for vpQuaternionVector:
Inheritance graph
[legend]

Public Member Functions

void buildFrom (const vpRotationMatrix &R)
 
vpQuaternionVector operator* (const double l)
 Multiplication by scalar. Returns a quaternion defined by (lx,ly,lz,lw). More...
 
vpQuaternionVector operator* (vpQuaternionVector &rq)
 Multiply two quaternions. More...
 
vpQuaternionVector operator+ (vpQuaternionVector &q)
 
vpQuaternionVector operator- (vpQuaternionVector &q)
 
vpQuaternionVector operator- ()
 Negate operator. Returns a quaternion defined by (-x,-y,-z-,-w). More...
 
vpQuaternionVectoroperator= (vpQuaternionVector &q)
 Copy operator. Allow operation such as Q = q. More...
 
void set (const double x, const double y, const double z, const double w)
 
unsigned int size ()
 
 vpQuaternionVector ()
 
 vpQuaternionVector (const double x, const double y, const double z, const double w)
 Constructor from doubles. More...
 
 vpQuaternionVector (const vpQuaternionVector &q)
 
 vpQuaternionVector (const vpRotationMatrix &R)
 
double w () const
 returns w-component of the quaternion More...
 
double x () const
 returns x-component of the quaternion More...
 
double y () const
 returns y-component of the quaternion More...
 
double z () const
 returns z-component of the quaternion More...
 

Private Attributes

double r [4]
 

Static Private Attributes

static const double minimum = 0.0001
 

Detailed Description

Defines a quaternion and its basic operations.

This class allows to compute a quaternion from a rotation matrix using either vpQuaternionVector(const vpRotationMatrix &) contructor or buildFrom() method.

It also defines common operations on a quaternion such as:

Definition at line 80 of file vpQuaternionVector.h.

Constructor & Destructor Documentation

vpQuaternionVector::vpQuaternionVector ( )

Definition at line 61 of file vpQuaternionVector.cpp.

vpQuaternionVector::vpQuaternionVector ( const double  x,
const double  y,
const double  z,
const double  w 
)

Constructor from doubles.

Definition at line 64 of file vpQuaternionVector.cpp.

vpQuaternionVector::vpQuaternionVector ( const vpQuaternionVector q)

Copy constructor.

Parameters
qquaternion to construct from.

Definition at line 85 of file vpQuaternionVector.cpp.

vpQuaternionVector::vpQuaternionVector ( const vpRotationMatrix &  R)

Constructs a quaternion from a rotation matrix.

Parameters
RMatrix containing a rotation.

Definition at line 76 of file vpQuaternionVector.cpp.

Member Function Documentation

void vpQuaternionVector::buildFrom ( const vpRotationMatrix &  R)

Constructs a quaternion from a rotation matrix.

Parameters
RRotation matrix.

Definition at line 163 of file vpQuaternionVector.cpp.

vpQuaternionVector vpQuaternionVector::operator* ( const double  l)

Multiplication by scalar. Returns a quaternion defined by (lx,ly,lz,lw).

Definition at line 138 of file vpQuaternionVector.cpp.

vpQuaternionVector vpQuaternionVector::operator* ( vpQuaternionVector rq)

Multiply two quaternions.

Definition at line 144 of file vpQuaternionVector.cpp.

vpQuaternionVector vpQuaternionVector::operator+ ( vpQuaternionVector q)

Quaternion addition.

Adds two quaternions. Addition is component-wise.

Parameters
qquaternion to add.

Definition at line 115 of file vpQuaternionVector.cpp.

vpQuaternionVector vpQuaternionVector::operator- ( vpQuaternionVector q)

Quaternion substraction.

Substracts a quaternion from another. Substraction is component-wise.

Parameters
qquaternion to substract.

Definition at line 126 of file vpQuaternionVector.cpp.

vpQuaternionVector vpQuaternionVector::operator- ( )

Negate operator. Returns a quaternion defined by (-x,-y,-z-,-w).

Definition at line 132 of file vpQuaternionVector.cpp.

vpQuaternionVector & vpQuaternionVector::operator= ( vpQuaternionVector q)

Copy operator. Allow operation such as Q = q.

Definition at line 152 of file vpQuaternionVector.cpp.

void vpQuaternionVector::set ( const double  x,
const double  y,
const double  z,
const double  w 
)

Manually change values of a quaternion.

Parameters
xx quaternion parameter.
yy quaternion parameter.
zz quaternion parameter.
ww quaternion parameter.

Definition at line 98 of file vpQuaternionVector.cpp.

unsigned int vpQuaternionVector::size ( )
inline

Definition at line 95 of file vpQuaternionVector.h.

double vpQuaternionVector::w ( ) const
inline

returns w-component of the quaternion

Definition at line 103 of file vpQuaternionVector.h.

double vpQuaternionVector::x ( ) const
inline

returns x-component of the quaternion

Definition at line 97 of file vpQuaternionVector.h.

double vpQuaternionVector::y ( ) const
inline

returns y-component of the quaternion

Definition at line 99 of file vpQuaternionVector.h.

double vpQuaternionVector::z ( ) const
inline

returns z-component of the quaternion

Definition at line 101 of file vpQuaternionVector.h.

Member Data Documentation

const double vpQuaternionVector::minimum = 0.0001
staticprivate

Definition at line 83 of file vpQuaternionVector.h.

double vpQuaternionVector::r[4]
private

Definition at line 84 of file vpQuaternionVector.h.


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


visp_bridge
Author(s): Filip Novotny
autogenerated on Wed Jul 3 2019 19:48:02