Initial Upload Week 4 [19/10]
This commit is contained in:
38
Matrix.h
Normal file
38
Matrix.h
Normal file
@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include "Vertex.h"
|
||||
#include <initializer_list>
|
||||
|
||||
// Size of the matrix
|
||||
const int COLS = 3;
|
||||
const int ROWS = 3;
|
||||
|
||||
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& 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);
|
||||
};
|
||||
|
Reference in New Issue
Block a user