-
Notifications
You must be signed in to change notification settings - Fork 0
/
Matrix.h
52 lines (41 loc) · 1.61 KB
/
Matrix.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// Created by rolo on 30-08-18.
//
#ifndef PMTOOL_MATRIX_H
#define PMTOOL_MATRIX_H
#include "Vector3D.h"
class Matrix {
private:
float m[4][4];
public:
Matrix();
Matrix(const int i);
Matrix(const float m[16]);
Matrix(const float m[4][4]);
Matrix(float m11,float m12,float m13,
float m21,float m22,float m23,
float m31,float m32,float m33);
Matrix(float m11,float m12,float m13, float m14,
float m21,float m22,float m23, float m24,
float m31,float m32,float m33, float m34,
float m41,float m42,float m43, float m44);
Matrix(const Vector3D &v1, const Vector3D &v2, const Vector3D &v3);
float det(const Matrix &M);
static float det(float m11);
static float det(float m11, float m12,
float m21, float m22);
static float det(float m11, float m12, float m13,
float m21, float m22, float m23,
float m31, float m32, float m33);
static float det(float m11, float m12, float m13, float m14,
float m21, float m22, float m23, float m24,
float m31, float m32, float m33, float m34,
float m41, float m42, float m43, float m44);
static float det(const Vector3D &v1, const Vector3D &v2, const Vector3D &v3);
inline float& operator()(int i, int j);
inline const float& operator()(int i, int j) const;
inline float * operator[](int i);
inline const float* operator[](int i) const;
friend Matrix& operator*(float value, Matrix &m); // MAtrix multiplication by float
};
#endif //PMTOOL_MATRIX_H