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

Last change on this file since 2 was 2, checked in by Sanahuja Guillaume, 6 years ago

flaircore

File size: 3.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 { namespace core {
17 class Quaternion;
18
19 /*! \class Euler
20 *
21 * \brief Class defining euler angles
22 *
23 * Euler angles are expressed in radians.
24 *
25 */
26 class Euler {
27 public:
28 /*!
29 * \brief Constructor
30 *
31 * Construct euler angles using specified values.
32 *
33 * \param roll roll value
34 * \param pitch pitch value
35 * \param yaw yaw value
36 */
37 Euler(float roll=0,float pitch=0,float yaw=0);
38
39 /*!
40 * \brief Destructor
41 *
42 */
43 ~Euler();
44
45 /*!
46 * \brief x axis rotation
47 *
48 * \param value rotation value in radians
49 */
50 //todo: passer par un quaternion
51 //void RotateX(float value);
52
53 /*!
54 * \brief x axis rotation
55 *
56 * \param value rotation value in degrees
57 */
58 //void RotateXDeg(float value);
59
60 /*!
61 * \brief y axis rotation
62 *
63 * \param value rotation value in radians
64 */
65 //void RotateY(float value);
66
67 /*!
68 * \brief y axis rotation
69 *
70 * \param value rotation value in degrees
71 */
72 //void RotateYDeg(float value);
73
74 /*!
75 * \brief z axis rotation
76 *
77 * \param value rotation value in radians
78 */
79 //void RotateZ(float value);
80
81 /*!
82 * \brief z axis rotation
83 *
84 * \param value rotation value in degrees
85 */
86 //void RotateZDeg(float value);
87
88 /*!
89 * \brief Convert to quaternion
90 *
91 * \param quaternion output quaternion
92 */
93 void ToQuaternion(Quaternion &quaternion) const;
94
95 /*!
96 * \brief Convert to quaternion
97 *
98 * \return quaternion
99 */
100 Quaternion ToQuaternion(void) const;
101 /*!
102 * \brief Convert from radian to degree
103 *
104 * \param radianValue value in radian
105 *
106 * \return value in degree
107 */
108 static float ToDegree(float radianValue);
109
110 /*!
111 * \brief Convert from degree to radian
112 *
113 * \param degreeValue value in degree
114 *
115 * \return value in radian
116 */
117 static float ToRadian(float degreeValue);
118
119 /*!
120 * \brief Compute yaw distance
121 *
122 * Compute yaw distance from given angle. This is the minimum distance.
123 *
124 * \param angle starting angle
125 *
126 * \return value distance in radian
127 */
128 float YawDistanceFrom(float angle) const;
129
130 /*!
131 * \brief roll value
132 */
133 float roll;
134
135 /*!
136 * \brief pitch value
137 */
138 float pitch;
139
140 /*!
141 * \brief yaw value
142 */
143 float yaw;
144
145 Euler& operator=(const Euler &euler);
146
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.