#ifndef ROBOT_MATRIX_H
#define ROBOT_MATRIX_H

#pragma once

#include <GL/gl.h>

class Cmatrix
{
public:
	double element[4][4];  // our 4X4 matrix

public:
	Cmatrix();
	Cmatrix(double e11, double e12, double e13, double e14, 
            double e21, double e22, double e23, double e24, 
            double e31, double e32, double e33, double e34, 
            double e41, double e42, double e43, double e44);

	~Cmatrix();

	Cmatrix operator+ (const Cmatrix &m);	// matrix addition operator
	Cmatrix operator* (const Cmatrix &m);	// matrix by matrix multiplication operator

    void Zeros();       // Set all matrix elements to zero
    void Ones();        // Set all matrix elements to one
    void Identity();    // Create the identity matrix

    void PrintMatrix();         // Print the Cmatrix
    void PrintGLmatrix();       // Print the current OpenGL transformation matrix in the stack

    GLfloat* GetGLmatrixPointer();  // Inits a GLfloat[16] OpenGL style matrix, converts the Cmatrix object to the OpenGL format and returns back a pointer to it
};

#endif
