Robot

Dependencies:   mbed QEI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers TransformationMatrix.h Source File

TransformationMatrix.h

00001 //
00002 // Created by m007 on 29/06/2020.
00003 //
00004 
00005 #ifndef UNTITLED_TRANSFORMATIONMATRIX_H
00006 #define UNTITLED_TRANSFORMATIONMATRIX_H
00007 #include "Matrix.h"
00008 #include "cmath"
00009 
00010 class TransformationMatrix : public Matrix<float> {
00011 private:
00012     void Clone(Matrix<float> Mat);
00013     Matrix<float> RotXInner(float thetaX);
00014     Matrix<float> RotYInner(float thetaY);
00015     Matrix<float> RotZInner(float thetaZ);
00016 
00017 public:
00018     TransformationMatrix();
00019     Matrix<float>& RotX(float thetaX);
00020     Matrix<float>& RotY(float thetaY);
00021     Matrix<float>& RotZ(float thetaZ);
00022 
00023     //Euler angles
00024     Matrix<float>& EulerXZX(float thetaX1,float thetaZ2,float thetaX3);
00025     Matrix<float>& EulerXYX(float thetaX1,float thetaY2,float thetaX3);
00026     Matrix<float>& EulerYXY(float thetaY1,float thetaX2,float thetaY3);
00027     Matrix<float>& EulerYZY(float thetaY1,float thetaZ2,float thetaY3);
00028     Matrix<float>& EulerZYZ(float thetaZ1,float thetaY2,float thetaZ3);
00029     Matrix<float>& EulerZXZ(float thetaZ1,float thetaX2,float thetaZ3);
00030 
00031 
00032     //Tait–Bryan angles
00033     Matrix<float>& EulerXZY(float thetaX1,float thetaZ2,float thetaY3);
00034     Matrix<float>& EulerXYZ(float thetaX1,float thetaY2,float thetaZ3);
00035     Matrix<float>& EulerYXZ(float thetaY1,float thetaX2,float thetaZ3);
00036     Matrix<float>& EulerYZX(float thetaY1,float thetaZ2,float thetaX3);
00037     Matrix<float>& EulerZYX(float thetaZ1,float thetaY2,float thetaX3);
00038     Matrix<float>& EulerZXY(float thetaZ1,float thetaX2,float thetaY3);
00039 
00040     Matrix<float>& Translation(float dx, float dy, float dz);
00041 
00042 };
00043 
00044 
00045 #endif //UNTITLED_TRANSFORMATIONMATRIX_H