[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 |
|
---|
| 19 | class OneAxisRotation_impl;
|
---|
| 20 |
|
---|
[15] | 21 | namespace flair {
|
---|
| 22 | namespace gui {
|
---|
| 23 | class LayoutPosition;
|
---|
[2] | 24 | }
|
---|
| 25 |
|
---|
[15] | 26 | namespace core {
|
---|
| 27 | class Euler;
|
---|
| 28 | class Quaternion;
|
---|
| 29 | class 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 | */
|
---|
| 38 | class OneAxisRotation : public gui::GroupBox {
|
---|
| 39 | public:
|
---|
| 40 | /*!
|
---|
| 41 | * \brief Constructor
|
---|
| 42 | *
|
---|
| 43 | * Construct a OneAxisRotation at given position.
|
---|
| 44 | *
|
---|
| 45 | * \param position position to place the GroupBox
|
---|
| 46 | * \param name name
|
---|
| 47 | */
|
---|
| 48 | OneAxisRotation(const gui::LayoutPosition *position, std::string namel);
|
---|
[2] | 49 |
|
---|
[15] | 50 | /*!
|
---|
| 51 | * \brief Destructor
|
---|
| 52 | *
|
---|
| 53 | */
|
---|
| 54 | ~OneAxisRotation();
|
---|
[2] | 55 |
|
---|
[15] | 56 | /*!
|
---|
| 57 | * \brief Compute rotation
|
---|
| 58 | *
|
---|
[167] | 59 | * \param vector Vector3Df to rotate
|
---|
[15] | 60 | */
|
---|
[167] | 61 | template <typename T> void ComputeRotation(core::Vector3D<T> &vector) const;
|
---|
[2] | 62 |
|
---|
[15] | 63 | /*!
|
---|
| 64 | * \brief Compute rotation
|
---|
| 65 | *
|
---|
| 66 | * \param euler Euler angle to rotate
|
---|
| 67 | */
|
---|
| 68 | void ComputeRotation(core::Euler &euler) const;
|
---|
[2] | 69 |
|
---|
[15] | 70 | /*!
|
---|
| 71 | * \brief Compute rotation
|
---|
| 72 | *
|
---|
| 73 | * \param quaternion Quaternion to rotate
|
---|
| 74 | */
|
---|
| 75 | void ComputeRotation(core::Quaternion &quaternion) const;
|
---|
[2] | 76 |
|
---|
[15] | 77 | /*!
|
---|
| 78 | * \brief Compute rotation
|
---|
| 79 | *
|
---|
| 80 | * \param matrix RotationMatrix to rotate
|
---|
| 81 | */
|
---|
| 82 | void ComputeRotation(core::RotationMatrix &matrix) const;
|
---|
[147] | 83 |
|
---|
| 84 | /*!
|
---|
| 85 | * \brief Get angle
|
---|
| 86 | *
|
---|
| 87 | * \return angle in radians
|
---|
| 88 | */
|
---|
[144] | 89 | float GetAngle() const;
|
---|
| 90 | int GetAxis() const;
|
---|
| 91 |
|
---|
[15] | 92 | private:
|
---|
| 93 | const class OneAxisRotation_impl *pimpl_;
|
---|
| 94 | };
|
---|
[2] | 95 |
|
---|
| 96 | } // end namespace core
|
---|
| 97 | } // end namespace flair
|
---|
| 98 |
|
---|
| 99 | #endif // ONEAXISROTATION_H
|
---|