GAMS  1.4.0
gams::pose::euler::Euler< A, B, C, Conv > Class Template Reference

Class template for representing an angle in Euler notation. More...

#include <Euler.h>

Public Member Functions

 Euler ()
 Default constructor. More...
 
template<typename A2 , typename B2 , typename C2 , typename Conv2 >
 Euler (const Euler< A2, B2, C2, Conv2 > &o)
 Constructor to convert from a different Euler convention. More...
 
 Euler (const OrientationVector &r)
 Constructor to convert from a Orientation (or OrientationVector) More...
 
 Euler (const Quaternion &quat)
 Constructor to convert from a unit Quaternion. More...
 
 Euler (double a, double b, double c)
 Constructor from radians. More...
 
template<typename Unit >
 Euler (double a, double b, double c, Unit u)
 Constructor from specified units. More...
 
double a () const
 Getter for the first angular angle, around axis A. More...
 
void a (double n)
 Setter for the first angular angle, around axis A. More...
 
double b () const
 Getter for the first angular angle, around axis B. More...
 
void b (double n)
 Setter for the first angular angle, around axis B. More...
 
double c () const
 Getter for the first angular angle, around axis C. More...
 
void c (double n)
 Setter for the first angular angle, around axis C. More...
 
Orientation to_orientation () const
 Convert this Euler angle to a Orientation (axis-angle notation), within the default frame. More...
 
Orientation to_orientation (const ReferenceFrame &frame) const
 Convert this Euler angle to an Orientation (axis-angle notation), within the specified frame. More...
 
Quaternion to_quat () const
 Convert this Euler angle to a Quaternion. More...
 

Static Public Member Functions

static Euler from_quat (const Quaternion &quat)
 Convert a Quaternion into a Euler angle. More...
 

Private Types

typedef detail::GetTypes< A, B, C, Conv >::F F
 
typedef detail::GetTypes< A, B, C, Conv >::Trig Trig
 

Private Member Functions

void set_from_quat (const Quaternion &quat)
 

Private Attributes

double a_
 
double b_
 
double c_
 

Detailed Description

template<typename A, typename B, typename C, typename Conv = conv::Intr>
class gams::pose::euler::Euler< A, B, C, Conv >

Class template for representing an angle in Euler notation.

Euler notation represents an angle as a sequence of angulars about axes applied in an order. The order of angulars, and whether they are applied to axes that follow the object as it orients, or stay fixed throughout, are the Euler convention. The template parameters of this class template specify the convention, using type tags from the "conv" namespace.

There are typedefs for all supported conventions provided for convenience. In particular, EulerVREP, and YawPitchRoll may be of most common utility.

Each convention requires specific support in the code. See EulerFormulas.inl for implementation details. If you use an unsupported convention, you will get a compile time error.

Avoid manipulating angles in this notation. It is better to convert to a Quaternion (or Orientation) and back, than to try to directly manipulate a Euler angle.

Template Parameters
Athe first axis of angular
Bthe second axis of angular
Cthe third axis of angular
Convwhether to use Extrinsic (conv::Extr) or Intrisic (conv::Intr) angulars in this convention. Default is Intr

Definition at line 157 of file Euler.h.

Member Typedef Documentation

◆ F

template<typename A , typename B , typename C , typename Conv = conv::Intr>
typedef detail::GetTypes<A,B,C,Conv>::F gams::pose::euler::Euler< A, B, C, Conv >::F
private

Definition at line 160 of file Euler.h.

◆ Trig

template<typename A , typename B , typename C , typename Conv = conv::Intr>
typedef detail::GetTypes<A,B,C,Conv>::Trig gams::pose::euler::Euler< A, B, C, Conv >::Trig
private

Definition at line 161 of file Euler.h.

Constructor & Destructor Documentation

◆ Euler() [1/6]

template<typename A , typename B , typename C , typename Conv = conv::Intr>
gams::pose::euler::Euler< A, B, C, Conv >::Euler ( )
inline

Default constructor.

Initializes angles to all zeroes (no angular).

Definition at line 166 of file Euler.h.

◆ Euler() [2/6]

template<typename A , typename B , typename C , typename Conv = conv::Intr>
gams::pose::euler::Euler< A, B, C, Conv >::Euler ( double  a,
double  b,
double  c 
)
inline

Constructor from radians.

Parameters
athe angular in radians around axis A
bthe angular in radians around axis B
cthe angular in radians around axis C

Definition at line 175 of file Euler.h.

◆ Euler() [3/6]

template<typename A , typename B , typename C , typename Conv = conv::Intr>
template<typename Unit >
gams::pose::euler::Euler< A, B, C, Conv >::Euler ( double  a,
double  b,
double  c,
Unit  u 
)

Constructor from specified units.

Parameters
uthe units flag (degrees, radians, or revolutions)
athe angular around axis A
bthe angular around axis B
cthe angular around axis C
Template Parameters
Unitthe type of the units flag (inferred automatically)

◆ Euler() [4/6]

template<typename A , typename B , typename C , typename Conv = conv::Intr>
gams::pose::euler::Euler< A, B, C, Conv >::Euler ( const Quaternion quat)
explicit

Constructor to convert from a unit Quaternion.

The unit-ness of the Quaternion is not verified. If a non-unit Quaternion is passed in, behaviour is undefined.

Parameters
quatthe Quaternion to convert. Must be a unit quaternion, or behavior is undefined.

◆ Euler() [5/6]

template<typename A , typename B , typename C , typename Conv = conv::Intr>
template<typename A2 , typename B2 , typename C2 , typename Conv2 >
gams::pose::euler::Euler< A, B, C, Conv >::Euler ( const Euler< A2, B2, C2, Conv2 > &  o)
explicit

Constructor to convert from a different Euler convention.

Parameters
othe other Euler object

◆ Euler() [6/6]

template<typename A , typename B , typename C , typename Conv = conv::Intr>
gams::pose::euler::Euler< A, B, C, Conv >::Euler ( const OrientationVector r)
explicit

Constructor to convert from a Orientation (or OrientationVector)

Parameters
rthe angular

Member Function Documentation

◆ a() [1/2]

template<typename A , typename B , typename C , typename Conv = conv::Intr>
double gams::pose::euler::Euler< A, B, C, Conv >::a ( ) const
inline

Getter for the first angular angle, around axis A.

Definition at line 216 of file Euler.h.

◆ a() [2/2]

template<typename A , typename B , typename C , typename Conv = conv::Intr>
void gams::pose::euler::Euler< A, B, C, Conv >::a ( double  n)
inline

Setter for the first angular angle, around axis A.

Definition at line 223 of file Euler.h.

◆ b() [1/2]

template<typename A , typename B , typename C , typename Conv = conv::Intr>
double gams::pose::euler::Euler< A, B, C, Conv >::b ( ) const
inline

Getter for the first angular angle, around axis B.

Definition at line 218 of file Euler.h.

◆ b() [2/2]

template<typename A , typename B , typename C , typename Conv = conv::Intr>
void gams::pose::euler::Euler< A, B, C, Conv >::b ( double  n)
inline

Setter for the first angular angle, around axis B.

Definition at line 225 of file Euler.h.

◆ c() [1/2]

template<typename A , typename B , typename C , typename Conv = conv::Intr>
double gams::pose::euler::Euler< A, B, C, Conv >::c ( ) const
inline

Getter for the first angular angle, around axis C.

Definition at line 220 of file Euler.h.

◆ c() [2/2]

template<typename A , typename B , typename C , typename Conv = conv::Intr>
void gams::pose::euler::Euler< A, B, C, Conv >::c ( double  n)
inline

Setter for the first angular angle, around axis C.

Definition at line 227 of file Euler.h.

◆ from_quat()

template<typename A , typename B , typename C , typename Conv = conv::Intr>
static Euler gams::pose::euler::Euler< A, B, C, Conv >::from_quat ( const Quaternion quat)
static

Convert a Quaternion into a Euler angle.

Parameters
quatthe Quaternion to convert
Returns
a Euler angle equivalent to quat

◆ set_from_quat()

template<typename A , typename B , typename C , typename Conv = conv::Intr>
void gams::pose::euler::Euler< A, B, C, Conv >::set_from_quat ( const Quaternion quat)
private

◆ to_orientation() [1/2]

template<typename A , typename B , typename C , typename Conv = conv::Intr>
Orientation gams::pose::euler::Euler< A, B, C, Conv >::to_orientation ( ) const

Convert this Euler angle to a Orientation (axis-angle notation), within the default frame.

Returns
the Orientation which represents the same angle as *this

◆ to_orientation() [2/2]

template<typename A , typename B , typename C , typename Conv = conv::Intr>
Orientation gams::pose::euler::Euler< A, B, C, Conv >::to_orientation ( const ReferenceFrame frame) const

Convert this Euler angle to an Orientation (axis-angle notation), within the specified frame.

Parameters
framethe reference frame the Orientation will belong to
Returns
the Orientation which represents the same angle as *this

◆ to_quat()

template<typename A , typename B , typename C , typename Conv = conv::Intr>
Quaternion gams::pose::euler::Euler< A, B, C, Conv >::to_quat ( ) const

Convert this Euler angle to a Quaternion.

Returns
the Quaternion which represents the same angle as *this

Member Data Documentation

◆ a_

template<typename A , typename B , typename C , typename Conv = conv::Intr>
double gams::pose::euler::Euler< A, B, C, Conv >::a_
private

Definition at line 261 of file Euler.h.

◆ b_

template<typename A , typename B , typename C , typename Conv = conv::Intr>
double gams::pose::euler::Euler< A, B, C, Conv >::b_
private

Definition at line 261 of file Euler.h.

◆ c_

template<typename A , typename B , typename C , typename Conv = conv::Intr>
double gams::pose::euler::Euler< A, B, C, Conv >::c_
private

Definition at line 261 of file Euler.h.


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