ARGoS  3
A parallel, multi-engine simulator for swarm robotics
rotationmatrix3.h
Go to the documentation of this file.
1 
9 #ifndef ROTATION_MATRIX3_H
10 #define ROTATION_MATRIX3_H
11 
12 namespace argos {
13  class CQuaternion;
14  class CVector3;
15 }
16 
17 #include "squarematrix.h"
18 
19 namespace argos {
20 
21  class CRotationMatrix3 : public CSquareMatrix<3> {
22 
23  friend class CTransformationMatrix3;
24 
25  public:
28  }
29 
30  CRotationMatrix3(const CMatrix<3,3>& c_matrix) : CSquareMatrix<3>() {
31  SetFromMatrix(c_matrix);
32  }
33 
34  CRotationMatrix3(const CQuaternion& c_quaternion) : CSquareMatrix<3>() {
35  SetFromQuaternion(c_quaternion);
36  }
37 
38  CRotationMatrix3(const CRadians& c_z_angle, const CRadians& c_y_angle, const CRadians& c_x_angle) : CSquareMatrix<3>() {
39  SetFromAngles(c_z_angle, c_y_angle, c_x_angle);
40  }
41 
42  CRotationMatrix3(Real f_value0, Real f_value1, Real f_value2,
43  Real f_value3, Real f_value4, Real f_value5,
44  Real f_value6, Real f_value7, Real f_value8) : CSquareMatrix<3>() {
45  SetFromValues(f_value0, f_value1, f_value2,
46  f_value3, f_value4, f_value5,
47  f_value6, f_value7, f_value8);
48  }
49 
50  void SetFromMatrix(const CMatrix<3,3>& c_matrix);
51 
52  void SetFromQuaternion(const CQuaternion& c_quaternion);
53 
54  void SetFromAngles(const CRadians& c_x_angle, const CRadians& c_y_angle, const CRadians& c_z_angle);
55 
56  void SetFromValues(Real f_value0, Real f_value1, Real f_value2,
57  Real f_value3, Real f_value4, Real f_value5,
58  Real f_value6, Real f_value7, Real f_value8);
59 
60  CQuaternion ToQuaternion() const;
61 
62  CVector3 operator*(const CVector3& c_vector) const;
63  };
64 }
65 
66 #endif
argos::CRotationMatrix3::SetFromAngles
void SetFromAngles(const CRadians &c_x_angle, const CRadians &c_y_angle, const CRadians &c_z_angle)
Definition: rotationmatrix3.cpp:95
argos::CRotationMatrix3::CRotationMatrix3
CRotationMatrix3(const CRadians &c_z_angle, const CRadians &c_y_angle, const CRadians &c_x_angle)
Definition: rotationmatrix3.h:38
argos
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
argos::CVector3
A 3D vector class.
Definition: vector3.h:29
argos::CRotationMatrix3::CRotationMatrix3
CRotationMatrix3(const CMatrix< 3, 3 > &c_matrix)
Definition: rotationmatrix3.h:30
argos::CRadians
It defines the basic type CRadians, used to store an angle value in radians.
Definition: angles.h:42
argos::CSquareMatrix
Definition: squarematrix.h:17
argos::CRotationMatrix3::SetFromValues
void SetFromValues(Real f_value0, Real f_value1, Real f_value2, Real f_value3, Real f_value4, Real f_value5, Real f_value6, Real f_value7, Real f_value8)
Definition: rotationmatrix3.cpp:117
argos::CRotationMatrix3::ToQuaternion
CQuaternion ToQuaternion() const
Definition: rotationmatrix3.cpp:15
argos::CTransformationMatrix3
Definition: transformationmatrix3.h:21
argos::CQuaternion
Definition: quaternion.h:14
argos::CRotationMatrix3::CRotationMatrix3
CRotationMatrix3()
Definition: rotationmatrix3.h:26
argos::CRotationMatrix3::CRotationMatrix3
CRotationMatrix3(Real f_value0, Real f_value1, Real f_value2, Real f_value3, Real f_value4, Real f_value5, Real f_value6, Real f_value7, Real f_value8)
Definition: rotationmatrix3.h:42
argos::CMatrix
Definition: matrix.h:20
argos::CRotationMatrix3::operator*
CVector3 operator*(const CVector3 &c_vector) const
Definition: rotationmatrix3.cpp:134
argos::CRotationMatrix3
Definition: rotationmatrix3.h:21
argos::CRotationMatrix3::SetFromMatrix
void SetFromMatrix(const CMatrix< 3, 3 > &c_matrix)
Definition: rotationmatrix3.cpp:56
argos::CRotationMatrix3::SetFromQuaternion
void SetFromQuaternion(const CQuaternion &c_quaternion)
Definition: rotationmatrix3.cpp:71
Real
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
argos::CSquareMatrix< 3 >::SetIdentityMatrix
void SetIdentityMatrix()
Definition: squarematrix.h:22
squarematrix.h
argos::CRotationMatrix3::CRotationMatrix3
CRotationMatrix3(const CQuaternion &c_quaternion)
Definition: rotationmatrix3.h:34