[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 | // created: 2013/04/17
|
---|
| 6 | // filename: OneAxisRotation.cpp
|
---|
| 7 | //
|
---|
| 8 | // author: Guillaume Sanahuja
|
---|
| 9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 10 | //
|
---|
| 11 | // version: $Id: $
|
---|
| 12 | //
|
---|
| 13 | // purpose: Class defining a rotation around one axis
|
---|
| 14 | //
|
---|
| 15 | //
|
---|
| 16 | /*********************************************************************/
|
---|
| 17 |
|
---|
[15] | 18 | // this "filter" is in core but it should be in filter
|
---|
| 19 | // filter depends on sensoractuator
|
---|
| 20 | // sensoractuators depends on oneaxisrotation
|
---|
| 21 | // so if oneaxisrotation is in fiter we have a circular dependency
|
---|
| 22 | // TODO: fix this!
|
---|
[2] | 23 |
|
---|
| 24 | #include "OneAxisRotation.h"
|
---|
| 25 | #include "OneAxisRotation_impl.h"
|
---|
| 26 | #include <Vector3D.h>
|
---|
| 27 | #include <Euler.h>
|
---|
| 28 |
|
---|
| 29 | using std::string;
|
---|
| 30 |
|
---|
[15] | 31 | namespace flair {
|
---|
| 32 | namespace core {
|
---|
[2] | 33 |
|
---|
[15] | 34 | OneAxisRotation::OneAxisRotation(const gui::LayoutPosition *position,
|
---|
| 35 | string name)
|
---|
| 36 | : gui::GroupBox(position, name) {
|
---|
| 37 | pimpl_ = new OneAxisRotation_impl(this);
|
---|
[2] | 38 | }
|
---|
| 39 |
|
---|
[15] | 40 | OneAxisRotation::~OneAxisRotation() { delete pimpl_; }
|
---|
[2] | 41 |
|
---|
[15] | 42 | void OneAxisRotation::ComputeRotation(Vector3D &vector) const {
|
---|
| 43 | pimpl_->ComputeRotation(vector);
|
---|
[2] | 44 | }
|
---|
| 45 |
|
---|
[15] | 46 | void OneAxisRotation::ComputeRotation(Euler &euler) const {
|
---|
| 47 | pimpl_->ComputeRotation(euler);
|
---|
[2] | 48 | }
|
---|
| 49 |
|
---|
[15] | 50 | void OneAxisRotation::ComputeRotation(Quaternion &quaternion) const {
|
---|
| 51 | pimpl_->ComputeRotation(quaternion);
|
---|
[2] | 52 | }
|
---|
| 53 |
|
---|
[15] | 54 | void OneAxisRotation::ComputeRotation(RotationMatrix &matrix) const {
|
---|
| 55 | pimpl_->ComputeRotation(matrix);
|
---|
[2] | 56 | }
|
---|
| 57 |
|
---|
| 58 | } // end namespace core
|
---|
| 59 | } // end namespace flair
|
---|