#pragma once
#include "Vertex.h"
#include <initializer_list>

// Size of the matrix
const int COLS = 4;
const int ROWS = 4;

class Matrix
{
public:
	Matrix();
	Matrix(std::initializer_list<float> inputList);
	// Take in an array of floats matching the cols and rows
	Matrix(const float arrayIn[ROWS][COLS]);	
	Matrix(const Matrix& other);

	~Matrix();

	float GetM(const int row, const int column) const;
	float GetMatrixCell(const int row, const int column) const;

	void SetM(const int row, const int column, const float value);
	void SetMatrixCell(const int row, const int column, const float value);
	void FromArray(const float arrayIn[ROWS][COLS]);

	Matrix IdentityMatrix();

	Matrix& operator= (const Matrix& rhs);
	Matrix& operator*= (const Matrix& rhs);

	bool operator==(const Matrix& other) const;
	const Matrix operator*(const Matrix& other) const;
	const Vertex operator*(const Vertex& other) const;

private:
	float _matrix[ROWS][COLS];
	void Copy(const Matrix& other);
};

