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

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

changement post/pre rotation

File size: 2.1 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 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>
[167]17#include <Vector3D.h>
[2]18
19class OneAxisRotation_impl;
20
[15]21namespace flair {
22namespace gui {
23class LayoutPosition;
[2]24}
25
[15]26namespace core {
27class Euler;
28class Quaternion;
29class RotationMatrix;
[2]30
[15]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 {
[187]39 public:
[15]40 /*!
[187]41 \enum RotationType_t
42 \brief rotation type
43 */
44 enum RotationType_t {
45 PreRotation,//rotation
46 PostRotation//frame change
47 };
48 /*!
[15]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 */
[187]56 OneAxisRotation(const gui::LayoutPosition *position, std::string name,RotationType_t rotationType);
[2]57
[15]58 /*!
59 * \brief Destructor
60 *
61 */
62 ~OneAxisRotation();
[2]63
[15]64 /*!
65 * \brief Compute rotation
66 *
[167]67 * \param vector Vector3Df to rotate
[15]68 */
[167]69 template <typename T> void ComputeRotation(core::Vector3D<T> &vector) const;
[2]70
[15]71 /*!
72 * \brief Compute rotation
73 *
74 * \param euler Euler angle to rotate
75 */
76 void ComputeRotation(core::Euler &euler) const;
[2]77
[15]78 /*!
79 * \brief Compute rotation
80 *
81 * \param quaternion Quaternion to rotate
82 */
83 void ComputeRotation(core::Quaternion &quaternion) const;
[2]84
[15]85 /*!
86 * \brief Compute rotation
87 *
88 * \param matrix RotationMatrix to rotate
89 */
90 void ComputeRotation(core::RotationMatrix &matrix) const;
[147]91
92 /*!
93 * \brief Get angle
94 *
95 * \return angle in radians
96 */
[144]97 float GetAngle() const;
98 int GetAxis() const;
99
[15]100private:
101 const class OneAxisRotation_impl *pimpl_;
102};
[2]103
104} // end namespace core
105} // end namespace flair
106
107#endif // ONEAXISROTATION_H
Note: See TracBrowser for help on using the repository browser.