diff --git a/sources/reactphysics3d/mathematics/Matrix.cpp b/sources/reactphysics3d/mathematics/Matrix.cpp index 6db12d09..fe745c43 100644 --- a/sources/reactphysics3d/mathematics/Matrix.cpp +++ b/sources/reactphysics3d/mathematics/Matrix.cpp @@ -24,6 +24,12 @@ // Namespaces using namespace reactphysics3d; +// Constructor without argument +Matrix::Matrix() + :nbRow(0), nbColumn(0) { + +} + // Constructor of the class Matrix Matrix::Matrix(int nbRow, int nbColumn) throw(std::invalid_argument) :nbRow(nbRow),nbColumn(nbColumn) { diff --git a/sources/reactphysics3d/mathematics/Matrix.h b/sources/reactphysics3d/mathematics/Matrix.h index f433136f..af45cc06 100644 --- a/sources/reactphysics3d/mathematics/Matrix.h +++ b/sources/reactphysics3d/mathematics/Matrix.h @@ -40,6 +40,7 @@ class Matrix { double** array; // Dynamic array that contains the values of the matrix public : + Matrix(); // Constructor without argument Matrix(int nbRow, int nbColum) throw(std::invalid_argument); // Constructor of the class Matrix Matrix(const Matrix& matrix); // Copy constructor of the class Matrix virtual ~Matrix(); // Destructor of the class Matrix diff --git a/sources/reactphysics3d/mathematics/Vector.cpp b/sources/reactphysics3d/mathematics/Vector.cpp index b8a7dc8d..4af1a3e6 100644 --- a/sources/reactphysics3d/mathematics/Vector.cpp +++ b/sources/reactphysics3d/mathematics/Vector.cpp @@ -23,6 +23,12 @@ // Namespaces using namespace reactphysics3d; +// Constructor without argument +Vector::Vector() + :nbComponent(0) { + +} + // Constructor of the class Vector Vector::Vector(int n) throw(std::invalid_argument) { // Check the argument diff --git a/sources/reactphysics3d/mathematics/Vector.h b/sources/reactphysics3d/mathematics/Vector.h index ecd4e6a4..47ac8409 100644 --- a/sources/reactphysics3d/mathematics/Vector.h +++ b/sources/reactphysics3d/mathematics/Vector.h @@ -39,6 +39,7 @@ class Vector { int nbComponent; // number of components in the vector public : + Vector(); // Constructor without argument Vector(int n) throw(std::invalid_argument); // Constructor of the class Vector Vector(const Vector& vector); // Copy-constructor of the class Vector virtual ~Vector(); // Destructor of the class Vector