rotationmatrix2.cpp
Go to the documentation of this file.
1 
9 #include "rotationmatrix2.h"
10 
11 #include <argos3/core/utility/math/angles.h>
12 
13 namespace argos {
14 
15  /****************************************/
16  /****************************************/
17 
19  Real cos_angle = Cos(c_angle);
20  Real sin_angle = Sin(c_angle);
21  /* Set values */
22  m_pfValues[0] = cos_angle;
23  m_pfValues[1] = -sin_angle;
24  m_pfValues[2] = sin_angle;
25  m_pfValues[3] = cos_angle;
26  }
27 
28  /****************************************/
29  /****************************************/
30 
32  m_pfValues[0] = c_matrix.m_pfValues[0];
33  m_pfValues[1] = c_matrix.m_pfValues[1];
34  m_pfValues[2] = c_matrix.m_pfValues[2];
35  m_pfValues[3] = c_matrix.m_pfValues[3];
36  }
37 
38  /****************************************/
39  /****************************************/
40 
41  void CRotationMatrix2::SetFromValues(Real f_value0, Real f_value1,
42  Real f_value2, Real f_value3) {
43  m_pfValues[0] = f_value0;
44  m_pfValues[1] = f_value1;
45  m_pfValues[2] = f_value2;
46  m_pfValues[3] = f_value3;
47  }
48 
49  /****************************************/
50  /****************************************/
51 
52 }
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
Real Cos(const CRadians &c_radians)
Computes the cosine of the passed value in radians.
Definition: angles.h:595
Real Sin(const CRadians &c_radians)
Computes the sine of the passed value in radians.
Definition: angles.h:586
It defines the basic type CRadians, used to store an angle value in radians.
Definition: angles.h:42
Real m_pfValues[ROWS *COLS]
Definition: matrix.h:222
void SetFromAngle(const CRadians &c_angle)
void SetFromValues(Real f_value0, Real f_value1, Real f_value2, Real f_value3)
void SetFromMatrix(const CMatrix< 2, 2 > &c_matrix)