Omnidome
Fulldome Mapping Software Toolkit
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Attributes | Friends
omni::geometry::EulerAngles Struct Reference

Mixin class for a zyx Euler Angle Rotation system. More...

#include <EulerAngles.h>

Collaboration diagram for omni::geometry::EulerAngles:
Collaboration graph
[legend]

Public Member Functions

 EulerAngles ()
 Default constructor, all angles are zero. More...
 
 EulerAngles (Angle _yaw, Angle _pitch, Angle _roll)
 Constructor by values. More...
 
Angleyaw ()
 Reference to yaw angle (Angle in Z direction) More...
 
Angle const & yaw () const
 Reference to yaw angle (Angle in Z direction, const version) More...
 
void setYaw (Angle _yaw)
 Set yaw angle (Z direction angle) to new value. More...
 
Anglepitch ()
 Reference to pitch angle (Angle in Y direction) More...
 
Angle const & pitch () const
 Reference to pitch angle (Angle in Y direction, const version) More...
 
void setPitch (Angle _pitch)
 Set pitch angle (Y direction angle) to new value. More...
 
Angleroll ()
 Reference to roll angle (Angle in X direction) More...
 
Angle const & roll () const
 Reference to roll angle (Angle in X direction) More...
 
void setRoll (Angle _roll)
 Set roll angle (X direction angle) to new value. More...
 
QMatrix4x4 matrix () const
 Calculate the rotation matrix. More...
 

Static Public Member Functions

static QMatrix4x4 matrix (Angle _yaw, Angle _pitch, Angle _roll)
 Public Static function to get rotation matrix conveniently. More...
 

Private Attributes

Angle yaw_
 Yaw Angle (Z direction) More...
 
Angle pitch_
 Pitch Angle (Y direction) More...
 
Angle roll_
 Roll Angle (X direction) More...
 

Friends

bool operator== (EulerAngles const &, EulerAngles const &)
 Test for equality. More...
 

Detailed Description

Mixin class for a zyx Euler Angle Rotation system.

Constructor & Destructor Documentation

omni::geometry::EulerAngles::EulerAngles ( )

Default constructor, all angles are zero.

27  :
28  yaw_(0), pitch_(0), roll_(0)
29  {}
Angle roll_
Roll Angle (X direction)
Definition: EulerAngles.h:86
Angle pitch_
Pitch Angle (Y direction)
Definition: EulerAngles.h:83
Angle yaw_
Yaw Angle (Z direction)
Definition: EulerAngles.h:80
omni::geometry::EulerAngles::EulerAngles ( Angle  _yaw,
Angle  _pitch,
Angle  _roll 
)

Constructor by values.

31  :
32  yaw_(_yaw),
33  pitch_(_pitch),
34  roll_(_roll)
35  {}
Angle roll_
Roll Angle (X direction)
Definition: EulerAngles.h:86
Angle pitch_
Pitch Angle (Y direction)
Definition: EulerAngles.h:83
Angle yaw_
Yaw Angle (Z direction)
Definition: EulerAngles.h:80

Member Function Documentation

QMatrix4x4 omni::geometry::EulerAngles::matrix ( Angle  _yaw,
Angle  _pitch,
Angle  _roll 
)
static

Public Static function to get rotation matrix conveniently.

83  {
84  QMatrix4x4 _matrix;
85 
86  // Rotate ZYX
87  _matrix.rotate(_yaw.degrees(), QVector3D(0.0, 0.0, 1.0));
88  _matrix.rotate(_pitch.degrees(), QVector3D(0.0, 1.0, 0.0));
89  _matrix.rotate(_roll.degrees(), QVector3D(1.0, 0.0, 0.0));
90  return _matrix;
91  }
QMatrix4x4 omni::geometry::EulerAngles::matrix ( ) const

Calculate the rotation matrix.

94  {
95  return matrix(yaw_, pitch_, roll_);
96  }
Angle roll_
Roll Angle (X direction)
Definition: EulerAngles.h:86
Angle pitch_
Pitch Angle (Y direction)
Definition: EulerAngles.h:83
Angle yaw_
Yaw Angle (Z direction)
Definition: EulerAngles.h:80
QMatrix4x4 matrix() const
Calculate the rotation matrix.
Definition: EulerAngles.cpp:93
Angle & omni::geometry::EulerAngles::pitch ( )

Reference to pitch angle (Angle in Y direction)

53  {
54  return pitch_;
55  }
Angle pitch_
Pitch Angle (Y direction)
Definition: EulerAngles.h:83
Angle const & omni::geometry::EulerAngles::pitch ( ) const

Reference to pitch angle (Angle in Y direction, const version)

58  {
59  return pitch_;
60  }
Angle pitch_
Pitch Angle (Y direction)
Definition: EulerAngles.h:83
Angle & omni::geometry::EulerAngles::roll ( )

Reference to roll angle (Angle in X direction)

68  {
69  return roll_;
70  }
Angle roll_
Roll Angle (X direction)
Definition: EulerAngles.h:86
Angle const & omni::geometry::EulerAngles::roll ( ) const

Reference to roll angle (Angle in X direction)

73  {
74  return roll_;
75  }
Angle roll_
Roll Angle (X direction)
Definition: EulerAngles.h:86
void omni::geometry::EulerAngles::setPitch ( Angle  _pitch)

Set pitch angle (Y direction angle) to new value.

63  {
64  pitch_ = _pitch;
65  }
Angle pitch_
Pitch Angle (Y direction)
Definition: EulerAngles.h:83
void omni::geometry::EulerAngles::setRoll ( Angle  _roll)

Set roll angle (X direction angle) to new value.

78  {
79  roll_ = _roll;
80  }
Angle roll_
Roll Angle (X direction)
Definition: EulerAngles.h:86
void omni::geometry::EulerAngles::setYaw ( Angle  _yaw)

Set yaw angle (Z direction angle) to new value.

48  {
49  yaw_ = _yaw;
50  }
Angle yaw_
Yaw Angle (Z direction)
Definition: EulerAngles.h:80
Angle & omni::geometry::EulerAngles::yaw ( )

Reference to yaw angle (Angle in Z direction)

38  {
39  return yaw_;
40  }
Angle yaw_
Yaw Angle (Z direction)
Definition: EulerAngles.h:80
Angle const & omni::geometry::EulerAngles::yaw ( ) const

Reference to yaw angle (Angle in Z direction, const version)

43  {
44  return yaw_;
45  }
Angle yaw_
Yaw Angle (Z direction)
Definition: EulerAngles.h:80

Friends And Related Function Documentation

bool operator== ( EulerAngles const &  _lhs,
EulerAngles const &  _rhs 
)
friend

Test for equality.

98  {
99  return
103  }
Angle roll_
Roll Angle (X direction)
Definition: EulerAngles.h:86
#define OMNI_TEST_MEMBER_EQUAL(member)
Definition: util.h:125
Angle pitch_
Pitch Angle (Y direction)
Definition: EulerAngles.h:83
Angle yaw_
Yaw Angle (Z direction)
Definition: EulerAngles.h:80

Field Documentation

Angle omni::geometry::EulerAngles::pitch_
private

Pitch Angle (Y direction)

Angle omni::geometry::EulerAngles::roll_
private

Roll Angle (X direction)

Angle omni::geometry::EulerAngles::yaw_
private

Yaw Angle (Z direction)


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