FormIt C++ API v25.0.0 (2025.0.0)
Loading...
Searching...
No Matches
WSM::Quaternion3d Class Reference

Description

The Quaternion3d class.

#include <Quaternion3d.h>

Public Member Functions

 Quaternion3d ()
 
 Quaternion3d (double aX, double aY, double aZ, double aW)
 
Quaternion3dfromRotation (const WSM::Vector3d &aAxis, double aAngle)
 Set the quaternion from an angle/axis pair.
 
void getRotation (WSM::Vector3d &aAxis, double &aAngle) const
 Get the axis and angle representation.
 
Quaternion3dfromTwoVectors (const WSM::Vector3d &aA, const WSM::Vector3d &aB)
 Set the quaternion from based on a from and to vector.
 
Quaternion3dfromThreeVectors (const WSM::Vector3d &aX, const WSM::Vector3d &aY, const WSM::Vector3d &aZ)
 Set the elements of the quaternion from 3 axes vectors.
 
Quaternion3dfromEulerAngles (double aX, double aY, double aZ)
 Set the quaternion from euler angles.
 
void getEulerAngles (double &aX, double &aY, double &aZ) const
 Get the Euler angles from the quaternion.
 
void getTransf3d (WSM::Transf3d &aT) const
 Get the 4x4 matrix from the quaternion.
 
Quaternion3didentity ()
 
Quaternion3dnormalize ()
 
Quaternion3dinvert ()
 
Quaternion3dinvertFrom (const Quaternion3d &aQ)
 
Quaternion3d getInverted () const
 
Quaternion3dset (double aX, double aY, double aZ, double aW)
 
bool operator== (const Quaternion3d &aQ) const
 
bool operator!= (const Quaternion3d &aQ) const
 
Quaternion3d operator* (const Quaternion3d &aQ) const
 
Quaternion3doperator*= (const Quaternion3d &aQ)
 
WSM::Vector3d operator* (const WSM::Vector3d &aT) const
 Returns the WSM::Vector3d rotated by the quaternion.
 

Public Attributes

double x = 0.0
 
double y = 0.0
 
double z = 0.0
 
double w = 1.0
 

Static Public Attributes

static const double kEpsilon
 
static const double kCosThreshold
 

Constructor & Destructor Documentation

◆ Quaternion3d() [1/2]

WSM::Quaternion3d::Quaternion3d ( )

◆ Quaternion3d() [2/2]

WSM::Quaternion3d::Quaternion3d ( double  aX,
double  aY,
double  aZ,
double  aW 
)

Member Function Documentation

◆ fromEulerAngles()

Quaternion3d & WSM::Quaternion3d::fromEulerAngles ( double  aX,
double  aY,
double  aZ 
)

Set the quaternion from euler angles.

◆ fromRotation()

Quaternion3d & WSM::Quaternion3d::fromRotation ( const WSM::Vector3d aAxis,
double  aAngle 
)

Set the quaternion from an angle/axis pair.

◆ fromThreeVectors()

Quaternion3d & WSM::Quaternion3d::fromThreeVectors ( const WSM::Vector3d aX,
const WSM::Vector3d aY,
const WSM::Vector3d aZ 
)

Set the elements of the quaternion from 3 axes vectors.

◆ fromTwoVectors()

Quaternion3d & WSM::Quaternion3d::fromTwoVectors ( const WSM::Vector3d aA,
const WSM::Vector3d aB 
)

Set the quaternion from based on a from and to vector.

◆ getEulerAngles()

void WSM::Quaternion3d::getEulerAngles ( double &  aX,
double &  aY,
double &  aZ 
) const

Get the Euler angles from the quaternion.

◆ getInverted()

Quaternion3d WSM::Quaternion3d::getInverted ( ) const

◆ getRotation()

void WSM::Quaternion3d::getRotation ( WSM::Vector3d aAxis,
double &  aAngle 
) const

Get the axis and angle representation.

◆ getTransf3d()

void WSM::Quaternion3d::getTransf3d ( WSM::Transf3d aT) const

Get the 4x4 matrix from the quaternion.

◆ identity()

Quaternion3d & WSM::Quaternion3d::identity ( )

◆ invert()

Quaternion3d & WSM::Quaternion3d::invert ( )

◆ invertFrom()

Quaternion3d & WSM::Quaternion3d::invertFrom ( const Quaternion3d aQ)

◆ normalize()

Quaternion3d & WSM::Quaternion3d::normalize ( )

◆ operator!=()

bool WSM::Quaternion3d::operator!= ( const Quaternion3d aQ) const

◆ operator*() [1/2]

Quaternion3d WSM::Quaternion3d::operator* ( const Quaternion3d aQ) const

◆ operator*() [2/2]

WSM::Vector3d WSM::Quaternion3d::operator* ( const WSM::Vector3d aT) const

Returns the WSM::Vector3d rotated by the quaternion.

◆ operator*=()

Quaternion3d & WSM::Quaternion3d::operator*= ( const Quaternion3d aQ)

◆ operator==()

bool WSM::Quaternion3d::operator== ( const Quaternion3d aQ) const

◆ set()

Quaternion3d & WSM::Quaternion3d::set ( double  aX,
double  aY,
double  aZ,
double  aW 
)

Member Data Documentation

◆ kCosThreshold

const double WSM::Quaternion3d::kCosThreshold
static

◆ kEpsilon

const double WSM::Quaternion3d::kEpsilon
static

◆ w

double WSM::Quaternion3d::w = 1.0

◆ x

double WSM::Quaternion3d::x = 0.0

◆ y

double WSM::Quaternion3d::y = 0.0

◆ z

double WSM::Quaternion3d::z = 0.0

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