source: flair-src/trunk/lib/FlairCore/src/OneAxisRotation.h@ 332

Last change on this file since 332 was 187, checked in by Sanahuja Guillaume, 7 years ago

changement post/pre rotation

File size: 2.1 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 OneAxisRotation.h
7 * \brief Class defining a rotation around one axis
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2013/04/17
10 * \version 4.0
11 */
12
13#ifndef ONEAXISROTATION_H
14#define ONEAXISROTATION_H
15
16#include <GroupBox.h>
17#include <Vector3D.h>
18
19class OneAxisRotation_impl;
20
21namespace flair {
22namespace gui {
23class LayoutPosition;
24}
25
26namespace core {
27class Euler;
28class Quaternion;
29class RotationMatrix;
30
31/*! \class OneAxisRotation
32*
33* \brief Class defining a rotation around one axis
34*
35* Axe and value of the rotation are placed in a GroupBox on ground station.
36*
37*/
38class OneAxisRotation : public gui::GroupBox {
39 public:
40 /*!
41 \enum RotationType_t
42 \brief rotation type
43 */
44 enum RotationType_t {
45 PreRotation,//rotation
46 PostRotation//frame change
47 };
48 /*!
49 * \brief Constructor
50 *
51 * Construct a OneAxisRotation at given position.
52 *
53 * \param position position to place the GroupBox
54 * \param name name
55 */
56 OneAxisRotation(const gui::LayoutPosition *position, std::string name,RotationType_t rotationType);
57
58 /*!
59 * \brief Destructor
60 *
61 */
62 ~OneAxisRotation();
63
64 /*!
65 * \brief Compute rotation
66 *
67 * \param vector Vector3Df to rotate
68 */
69 template <typename T> void ComputeRotation(core::Vector3D<T> &vector) const;
70
71 /*!
72 * \brief Compute rotation
73 *
74 * \param euler Euler angle to rotate
75 */
76 void ComputeRotation(core::Euler &euler) const;
77
78 /*!
79 * \brief Compute rotation
80 *
81 * \param quaternion Quaternion to rotate
82 */
83 void ComputeRotation(core::Quaternion &quaternion) const;
84
85 /*!
86 * \brief Compute rotation
87 *
88 * \param matrix RotationMatrix to rotate
89 */
90 void ComputeRotation(core::RotationMatrix &matrix) const;
91
92 /*!
93 * \brief Get angle
94 *
95 * \return angle in radians
96 */
97 float GetAngle() const;
98 int GetAxis() const;
99
100private:
101 const class OneAxisRotation_impl *pimpl_;
102};
103
104} // end namespace core
105} // end namespace flair
106
107#endif // ONEAXISROTATION_H
Note: See TracBrowser for help on using the repository browser.