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

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

sources reformatted with flair-format-dir script

File size: 2.6 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
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
16namespace flair {
17namespace core {
18class Quaternion;
19
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);
39
40 /*!
41 * \brief Destructor
42 *
43 */
44 ~Euler();
45
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);
53
54 /*!
55 * \brief x axis rotation
56 *
57 * \param value rotation value in degrees
58 */
59 // void RotateXDeg(float value);
60
61 /*!
62 * \brief y axis rotation
63 *
64 * \param value rotation value in radians
65 */
66 // void RotateY(float value);
67
68 /*!
69 * \brief y axis rotation
70 *
71 * \param value rotation value in degrees
72 */
73 // void RotateYDeg(float value);
74
75 /*!
76 * \brief z axis rotation
77 *
78 * \param value rotation value in radians
79 */
80 // void RotateZ(float value);
81
82 /*!
83 * \brief z axis rotation
84 *
85 * \param value rotation value in degrees
86 */
87 // void RotateZDeg(float value);
88
89 /*!
90 * \brief Convert to quaternion
91 *
92 * \param quaternion output quaternion
93 */
94 void ToQuaternion(Quaternion &quaternion) const;
95
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);
110
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);
119
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;
130
131 /*!
132 * \brief roll value
133 */
134 float roll;
135
136 /*!
137 * \brief pitch value
138 */
139 float pitch;
140
141 /*!
142 * \brief yaw value
143 */
144 float yaw;
145
146 Euler &operator=(const Euler &euler);
147};
148
149} // end namespace core
150} // end namespace flair
151
152#endif // EULER_H
Note: See TracBrowser for help on using the repository browser.