1. Adrien Saladin
  2. PTools

Commits

Adrien Saladin  committed 096c4b1

some code cleaning

  • Participants
  • Parent commits 2502fa1
  • Branches feature/heligeom_cython, heligeom

Comments (0)

Files changed (2)

File Movement.cpp

View file
 }
 
 
-Movement::Movement(Matrix m)
+Movement::Movement(const Matrix& matrix)
 {
-  this->m=m;
+  this->m=matrix;
 }
 
 
 }
 
 
-Matrix Movement::getMatrix()
+const Matrix& Movement::getMatrix() const
 {
   return m;
 }
 }
 
 
-void Movement::print()
+void Movement::print() const
 {
   m.Print();
 }

File Movement.h

View file
         
     public:
     Movement();
-    Movement(Matrix);
+    explicit Movement(const Matrix& matrix);
     ~Movement();
     
     ///operator + : merge two Movements by multiplying the Matrix
     Movement operator+ (Movement);
+
     /// apply the Matrix to a Rigidbody
     void apply(Rigidbody& rigbody);
     
     ///return the Matrix
-    Matrix getMatrix();
+    const Matrix& getMatrix() const;
     
     ///print the Matrix
-    void print();
+    void print() const;
     
     
   };
   //fonction pour les matrices, a relocaliser dans la partie ptools adapter
   ///Multiply two Matrix
   Matrix matrixMultiply(Matrix,Matrix);
+
   ///inverse a Matrix of dimension 4 by 4
   Matrix inverseMatrix44 (Matrix);
+
   ///inverse a Matrix representing a rotation and a translation 
   Matrix inverseTranformationMatrix(Matrix);
+
   ///inverse a Matrix representing a rotation and a translation 
   Matrix inverseTranformationMatrixPlusPlus(Matrix);