source: flair-src/trunk/lib/FlairCore/src/Euler.h@ 16

Last change on this file since 16 was 15, checked in by Bayard Gildas, 6 years ago

sources reformatted with flair-format-dir script

File size: 2.6 KB
RevLine 
[2]1// %flair:license{
[15]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[2]4// %flair:license}
5/*!
6 * \file Euler.h
7 * \brief Class defining euler angles
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2013/05/02
10 * \version 4.0
11 */
12
13#ifndef EULER_H
14#define EULER_H
15
[15]16namespace flair {
17namespace core {
18class Quaternion;
[2]19
[15]20/*! \class Euler
21*
22* \brief Class defining euler angles
23*
24* Euler angles are expressed in radians.
25*
26*/
27class Euler {
28public:
29 /*!
30 * \brief Constructor
31 *
32 * Construct euler angles using specified values.
33 *
34 * \param roll roll value
35 * \param pitch pitch value
36 * \param yaw yaw value
37 */
38 Euler(float roll = 0, float pitch = 0, float yaw = 0);
[2]39
[15]40 /*!
41 * \brief Destructor
42 *
43 */
44 ~Euler();
[2]45
[15]46 /*!
47 * \brief x axis rotation
48 *
49 * \param value rotation value in radians
50 */
51 // todo: passer par un quaternion
52 // void RotateX(float value);
[2]53
[15]54 /*!
55 * \brief x axis rotation
56 *
57 * \param value rotation value in degrees
58 */
59 // void RotateXDeg(float value);
[2]60
[15]61 /*!
62 * \brief y axis rotation
63 *
64 * \param value rotation value in radians
65 */
66 // void RotateY(float value);
[2]67
[15]68 /*!
69 * \brief y axis rotation
70 *
71 * \param value rotation value in degrees
72 */
73 // void RotateYDeg(float value);
[2]74
[15]75 /*!
76 * \brief z axis rotation
77 *
78 * \param value rotation value in radians
79 */
80 // void RotateZ(float value);
[2]81
[15]82 /*!
83 * \brief z axis rotation
84 *
85 * \param value rotation value in degrees
86 */
87 // void RotateZDeg(float value);
[2]88
[15]89 /*!
90 * \brief Convert to quaternion
91 *
92 * \param quaternion output quaternion
93 */
94 void ToQuaternion(Quaternion &quaternion) const;
[2]95
[15]96 /*!
97 * \brief Convert to quaternion
98 *
99 * \return quaternion
100 */
101 Quaternion ToQuaternion(void) const;
102 /*!
103 * \brief Convert from radian to degree
104 *
105 * \param radianValue value in radian
106 *
107 * \return value in degree
108 */
109 static float ToDegree(float radianValue);
[2]110
[15]111 /*!
112 * \brief Convert from degree to radian
113 *
114 * \param degreeValue value in degree
115 *
116 * \return value in radian
117 */
118 static float ToRadian(float degreeValue);
[2]119
[15]120 /*!
121 * \brief Compute yaw distance
122 *
123 * Compute yaw distance from given angle. This is the minimum distance.
124 *
125 * \param angle starting angle
126 *
127 * \return value distance in radian
128 */
129 float YawDistanceFrom(float angle) const;
[2]130
[15]131 /*!
132 * \brief roll value
133 */
134 float roll;
[2]135
[15]136 /*!
137 * \brief pitch value
138 */
139 float pitch;
[2]140
[15]141 /*!
142 * \brief yaw value
143 */
144 float yaw;
[2]145
[15]146 Euler &operator=(const Euler &euler);
147};
[2]148
149} // end namespace core
150} // end namespace flair
151
152#endif // EULER_H
Note: See TracBrowser for help on using the repository browser.