t
Loading...
Searching...
No Matches
t::EulerRotation Class Reference

The Euler rotation class. More...

#include <EulerRotation.hpp>

Public Member Functions

 EulerRotation (double _x, double _y, double _z, EulerRotationOrder _order)
 Creates a new representation of a rotation based on Euler angles.
 
EulerRotationcopy (const EulerRotation &source)
 Copies another Euler rotation into this Euler rotation.
 

Public Attributes

double x
 The amount of rotation about the local X axis in radians.
 
double y
 The amount of rotation about the local Y axis in radians.
 
double z
 The amount of rotation about the local Z axis in radians.
 
EulerRotationOrder order
 The order to perform the rotations around individual axes.
 

Friends

EulerRotation operator+ (const EulerRotation &a, const EulerRotation &b)
 Adds 2 Euler rotations.
 
EulerRotation operator- (const EulerRotation &a, const EulerRotation &b)
 Substracts an Euler rotation from another Euler rotation.
 

Detailed Description

The Euler rotation class.

An Euler rotation is represented by 3 rotations about the local X, Y, and Z axes, executed in a certain order. Note that if the 3 rotations are the same but the execution order is different, we might get a different rotation.

Constructor & Destructor Documentation

◆ EulerRotation()

t::EulerRotation::EulerRotation ( double _x,
double _y,
double _z,
EulerRotationOrder _order )
inline

Creates a new representation of a rotation based on Euler angles.

Parameters
_xThe amount of rotation about the local X axis in radians.
_yThe amount of rotation about the local Y axis in radians.
_zThe amount of rotation about the local Z axis in radians.
_orderThe order to perform the rotations around individual axes.

Member Function Documentation

◆ copy()

EulerRotation & t::EulerRotation::copy ( const EulerRotation & source)
inline

Copies another Euler rotation into this Euler rotation.

Parameters
sourceThe Euler rotation to copy from.
Returns
This Euler rotation.

Friends And Related Symbol Documentation

◆ operator+

EulerRotation operator+ ( const EulerRotation & a,
const EulerRotation & b )
friend

Adds 2 Euler rotations.

Parameters
aAn Euler rotation.
bAnother Euler rotation.
Returns
The result of adding a and b.

◆ operator-

EulerRotation operator- ( const EulerRotation & a,
const EulerRotation & b )
friend

Substracts an Euler rotation from another Euler rotation.

Parameters
aAn Euler rotation.
bAnother Euler rotation.
Returns
The difference of a and b.

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