Warning: include(php/utility.php): Failed to open stream: No such file or directory in /home/argos/argos3/doc/api/embedded/a00487_source.php on line 2

Warning: include(): Failed opening 'php/utility.php' for inclusion (include_path='.:/usr/lib64/php') in /home/argos/argos3/doc/api/embedded/a00487_source.php on line 2
The ARGoS Website

rotationmatrix2.h
Go to the documentation of this file.
1 
9 #ifndef ROTATION_MATRIX2_H
10 #define ROTATION_MATRIX2_H
11 
12 namespace argos {
13  class CRadians;
14 }
15 
16 #include <argos3/core/utility/math/matrix/squarematrix.h>
17 #include <argos3/core/utility/math/vector2.h>
18 
19 namespace argos {
20 
21  class CRotationMatrix2 : public CSquareMatrix<2> {
22 
23  friend class CTransformationMatrix2;
24 
25  public:
28  }
29 
30  CRotationMatrix2(const CMatrix<2,2>& c_matrix) {
31  SetFromMatrix(c_matrix);
32  }
33 
34  CRotationMatrix2(const CRadians& c_angle) : CSquareMatrix<2>() {
35  SetFromAngle(c_angle);
36  }
37 
38  CRotationMatrix2(Real f_value0, Real f_value1,
39  Real f_value2, Real f_value3) : CSquareMatrix<2>() {
40  SetFromValues(f_value0, f_value1,
41  f_value2, f_value3);
42  }
43 
44  void SetFromMatrix(const CMatrix<2,2>& c_matrix);
45 
46  void SetFromAngle(const CRadians& c_angle);
47 
48  void SetFromValues(Real f_value0, Real f_value1,
49  Real f_value2, Real f_value3);
50 
51  CVector2 operator*(const CVector2& c_vector) const {
52  return CVector2(m_pfValues[0]*c_vector.m_fX + m_pfValues[1]*c_vector.m_fY,
53  m_pfValues[2]*c_vector.m_fX + m_pfValues[3]*c_vector.m_fY);
54  }
55  };
56 }
57 
58 #endif
CRotationMatrix2(const CMatrix< 2, 2 > &c_matrix)
CRotationMatrix2(Real f_value0, Real f_value1, Real f_value2, Real f_value3)
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
CRotationMatrix2(const CRadians &c_angle)
void SetFromValues(Real f_value0, Real f_value1, Real f_value2, Real f_value3)
It defines the basic type CRadians, used to store an angle value in radians.
Definition: angles.h:42
void SetFromMatrix(const CMatrix< 2, 2 > &c_matrix)
A 2D vector class.
Definition: vector2.h:25
void SetFromAngle(const CRadians &c_angle)
Real m_pfValues[ROWS *COLS]
Definition: matrix.h:222
CVector2 operator*(const CVector2 &c_vector) const
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12