-
Notifications
You must be signed in to change notification settings - Fork 0
/
Matrix.h
40 lines (29 loc) · 890 Bytes
/
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
#ifndef MATRIX_H
#define MATRIX_H
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
using namespace std;
struct Ray;
struct Matrix
{
vector<vector<float> > t;
vector<vector<float> > t_1;
Matrix();
Matrix(float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float);
Matrix operator*(const Matrix&);
Matrix& operator*=(const Matrix&);
float Determinant(vector<vector<float> >&,int);
void Calc_Inverse();
vector<float> Vec_Mul(vector<float>&);
vector<float> Inv_Vec_Mul(vector<float>&);
void print();
void print_Inv();
Ray transform_inv(Ray &r);
vector<float> transform_inv_transpose(vector<float> v);
private:
void Cofactor(int,int,vector<vector<float> >&,vector<vector<float> >&,int);
void Adjoint(vector<vector<float> > &,vector<vector<float> > &);
};
#endif