vector-to-rotation.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2010,
3  * François Bleibel,
4  * Olivier Stasse,
5  *
6  * CNRS/AIST
7  *
8  */
9 
10 #ifndef __SOTVECTORTOMATRIX_HH
11 #define __SOTVECTORTOMATRIX_HH
12 
13 #include <dynamic-graph/all-signals.h>
14 #include <dynamic-graph/entity.h>
16 
17 /* Matrix */
18 #include <dynamic-graph/linear-algebra.h>
19 namespace dg = dynamicgraph;
20 
21 /* STD */
22 #include <vector>
23 
24 /* --------------------------------------------------------------------- */
25 /* --- API ------------------------------------------------------------- */
26 /* --------------------------------------------------------------------- */
27 
28 #if defined(WIN32)
29 #if defined(vector_to_rotation_EXPORTS)
30 #define SOTVECTORTOROTATION_EXPORT __declspec(dllexport)
31 #else
32 #define SOTVECTORTOROTATION_EXPORT __declspec(dllimport)
33 #endif
34 #else
35 #define SOTVECTORTOROTATION_EXPORT
36 #endif
37 
38 /* --------------------------------------------------------------------- */
39 /* --- VECTOR ---------------------------------------------------------- */
40 /* --------------------------------------------------------------------- */
41 namespace dynamicgraph {
42 namespace sot {
43 namespace dg = dynamicgraph;
44 
45 class SOTVECTORTOROTATION_EXPORT VectorToRotation : public dg::Entity {
46  static const std::string CLASS_NAME;
47  virtual const std::string &getClassName(void) const { return CLASS_NAME; }
48 
49  enum sotAxis { AXIS_X, AXIS_Y, AXIS_Z };
50 
51  unsigned int size;
52  std::vector<sotAxis> axes;
53 
54 public:
55  VectorToRotation(const std::string &name);
56 
57  virtual ~VectorToRotation(void) {}
58 
59  dg::SignalPtr<dg::Vector, int> SIN;
60  dg::SignalTimeDependent<MatrixRotation, int> SOUT;
61 
62  MatrixRotation &computeRotation(const dg::Vector &angles,
63  MatrixRotation &res);
64 };
65 
66 } /* namespace sot */
67 } /* namespace dynamicgraph */
68 
69 #endif // #ifndef __SOTVECTORTOMATRIX_HH
dynamicgraph::sot::VectorToRotation::~VectorToRotation
virtual ~VectorToRotation(void)
Definition: vector-to-rotation.hh:57
dynamicgraph
Definition: abstract-sot-external-interface.hh:17
dynamicgraph::sot::VectorToRotation
Definition: vector-to-rotation.hh:45
dynamicgraph::sot::VectorToRotation::SIN
dg::SignalPtr< dg::Vector, int > SIN
Definition: vector-to-rotation.hh:59
dynamicgraph::sot::VectorToRotation::SOUT
dg::SignalTimeDependent< MatrixRotation, int > SOUT
Definition: vector-to-rotation.hh:60
matrix-geometry.hh
SOTVECTORTOROTATION_EXPORT
#define SOTVECTORTOROTATION_EXPORT
Definition: vector-to-rotation.hh:35
dynamicgraph::sot::MatrixRotation
Eigen::Matrix< double, 3, 3 > SOT_CORE_EXPORT MatrixRotation
Definition: matrix-geometry.hh:75