casacore
Public Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members

More...

#include <Euler.h>

Public Member Functions

 Euler ()
 Default constructor generates zero filled Double vector of length 3, with (1,2,3) axes. More...
 
 Euler (const Euler &other)
 Copy constructor. More...
 
Euleroperator= (const Euler &other)
 Copy assignment. More...
 
 Euler (Double in0, Double in1=0, Double in2=0)
 Constructs an Euler with specified angles and (1,2,3) axes. More...
 
 Euler (Double in0, uInt ax0, Double in1=0, uInt ax1=0, Double in2=0, uInt ax2=0)
 Constructs an Euler with specified angles and axes. More...
 
 Euler (const Quantity &in0)
 
 Euler (const Quantity &in0, const Quantity &in1)
 
 Euler (const Quantity &in0, const Quantity &in1, const Quantity &in2)
 
 Euler (const Quantity &in0, uInt ax0)
 
 Euler (const Quantity &in0, uInt ax0, const Quantity &in1, uInt ax1=0)
 
 Euler (const Quantity &in0, uInt ax0, const Quantity &in1, uInt ax1, const Quantity &in2, uInt ax2=0)
 
 Euler (const Quantum< Vector< Double > > &in)
 Constructs an Euler (zero filled) from elements of Quantity vector. More...
 
 Euler (const Quantum< Vector< Double > > &in, const Vector< uInt > &ax)
 
 ~Euler ()
 Destructor. More...
 
Euler operator- () const
 The unary minus reverses the sign and order of the Euler angles. More...
 
Euleroperator+= (const Euler &right)
 Addition and subtraction. More...
 
Euler operator+ (const Euler &right) const
 
Euleroperator-= (const Euler &right)
 
Euler operator- (const Euler &right) const
 
Doubleoperator() (uInt which)
 Return the which' angle. More...
 
const Doubleoperator() (uInt which) const
 
Quantum< Vector< Double > > getAngle () const
 with the optional conversion units. More...
 
Quantum< Vector< Double > > getAngle (const Unit &unit) const
 
void set (uInt which, uInt ax)
 Set an axis. More...
 
void set (uInt ax0, uInt ax1, uInt ax2)
 Set all axes. More...
 
Int get (uInt which) const
 Get an axis. More...
 

Static Private Member Functions

static Double makeRad (const Quantity &in)
 The makeRad functions check and convert the input Quantities to radians. More...
 
static Vector< DoublemakeRad (const Quantum< Vector< Double > > &in)
 

Private Attributes

Vector< Doubleeuler
 vector with 3 Euler angles (data.first) More...
 
Vector< Intaxes
 Axes (data.second) More...
 

Friends

ostream & operator<< (ostream &os, const Euler &eul)
 Output Euler angles. More...
 

Detailed Description

Vector of Euler rotation angles

Intended use:

Internal

Review Status

Reviewed By:
tcornwel
Date Reviewed:
1996/02/15
Test programs:
tMeasMath

Prerequisite

Etymology

Euler angles describe the rotation of a coordinate system

Synopsis

The Euler class is a vector of three angles, together with a vector of three signed integers. The angles describe the rotation around an axis of a coordinate system, the integers the actual axis around which to rotate. The integer can be 0 (do not use this angle) or 1,2,3 to indicate the axis. Given angles (a1,a2,a3) and axes (i1,i2,i3), the actual rotation matrix constructed will be:
R = Ri3(a3).Ri2(a2).Ri1(a1)
It has the following constructors:

It has a unary minus operator, which reverses the sign and order of the three angles, and the order of the axes, to produce the Euler angles for a rotation with opposite signs, so that RotMatrix(-Euler) will generate the inverse rotation matrix as compared with RotMatrix(Euler).
getAngle() functions return the Euler angles as a Quantum vector.
Eulers have addition and subtraction (on the angles). Note that this produces the correct angles for a combined rotation only if the axes are identical.
A (which) operator returns the indicated angle. Set/get functions manipulate the axes.

Example

Quantity angle(25,"deg"); // 25 degrees
Euler eul(angle.get().getValue(),2); // rotate over axis 2 (radians)
RotMatrix rot(eul); // generates rotation matrix
Euler()
Default constructor generates zero filled Double vector of length 3, with (1,2,3) axes.
Quantum< Double > Quantity
Definition: Quantum.h:38

Motivation

To use generated precession and nutation results

Definition at line 116 of file Euler.h.

Constructor & Destructor Documentation

◆ Euler() [1/12]

casacore::Euler::Euler ( )

Default constructor generates zero filled Double vector of length 3, with (1,2,3) axes.

◆ Euler() [2/12]

casacore::Euler::Euler ( const Euler other)

Copy constructor.

◆ Euler() [3/12]

casacore::Euler::Euler ( Double  in0,
Double  in1 = 0,
Double  in2 = 0 
)

Constructs an Euler with specified angles and (1,2,3) axes.

◆ Euler() [4/12]

casacore::Euler::Euler ( Double  in0,
uInt  ax0,
Double  in1 = 0,
uInt  ax1 = 0,
Double  in2 = 0,
uInt  ax2 = 0 
)

Constructs an Euler with specified angles and axes.

◆ Euler() [5/12]

casacore::Euler::Euler ( const Quantity in0)

Thrown Exceptions

Constructs an Euler from specified angle quantities

◆ Euler() [6/12]

casacore::Euler::Euler ( const Quantity in0,
const Quantity in1 
)

◆ Euler() [7/12]

casacore::Euler::Euler ( const Quantity in0,
const Quantity in1,
const Quantity in2 
)

◆ Euler() [8/12]

casacore::Euler::Euler ( const Quantity in0,
uInt  ax0 
)

◆ Euler() [9/12]

casacore::Euler::Euler ( const Quantity in0,
uInt  ax0,
const Quantity in1,
uInt  ax1 = 0 
)

◆ Euler() [10/12]

casacore::Euler::Euler ( const Quantity in0,
uInt  ax0,
const Quantity in1,
uInt  ax1,
const Quantity in2,
uInt  ax2 = 0 
)

◆ Euler() [11/12]

casacore::Euler::Euler ( const Quantum< Vector< Double > > &  in)

Constructs an Euler (zero filled) from elements of Quantity vector.

◆ Euler() [12/12]

casacore::Euler::Euler ( const Quantum< Vector< Double > > &  in,
const Vector< uInt > &  ax 
)

◆ ~Euler()

casacore::Euler::~Euler ( )

Destructor.

Member Function Documentation

◆ get()

Int casacore::Euler::get ( uInt  which) const

Get an axis.

◆ getAngle() [1/2]

Quantum<Vector<Double> > casacore::Euler::getAngle ( ) const

with the optional conversion units.

◆ getAngle() [2/2]

Quantum<Vector<Double> > casacore::Euler::getAngle ( const Unit unit) const

◆ makeRad() [1/2]

static Double casacore::Euler::makeRad ( const Quantity in)
staticprivate

The makeRad functions check and convert the input Quantities to radians.

◆ makeRad() [2/2]

static Vector<Double> casacore::Euler::makeRad ( const Quantum< Vector< Double > > &  in)
staticprivate

◆ operator()() [1/2]

Double& casacore::Euler::operator() ( uInt  which)

Return the which' angle.

◆ operator()() [2/2]

const Double& casacore::Euler::operator() ( uInt  which) const

◆ operator+()

Euler casacore::Euler::operator+ ( const Euler right) const

◆ operator+=()

Euler& casacore::Euler::operator+= ( const Euler right)

Addition and subtraction.

◆ operator-() [1/2]

Euler casacore::Euler::operator- ( ) const

The unary minus reverses the sign and order of the Euler angles.

◆ operator-() [2/2]

Euler casacore::Euler::operator- ( const Euler right) const

◆ operator-=()

Euler& casacore::Euler::operator-= ( const Euler right)

◆ operator=()

Euler& casacore::Euler::operator= ( const Euler other)

Copy assignment.

◆ set() [1/2]

void casacore::Euler::set ( uInt  ax0,
uInt  ax1,
uInt  ax2 
)

Set all axes.

◆ set() [2/2]

void casacore::Euler::set ( uInt  which,
uInt  ax 
)

Set an axis.

Friends And Related Function Documentation

◆ operator<<

ostream& operator<< ( ostream &  os,
const Euler eul 
)
friend

Output Euler angles.

Member Data Documentation

◆ axes

Vector<Int> casacore::Euler::axes
private

Axes (data.second)

Definition at line 196 of file Euler.h.

◆ euler

Vector<Double> casacore::Euler::euler
private

vector with 3 Euler angles (data.first)

Definition at line 194 of file Euler.h.


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