-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathray.h
53 lines (34 loc) · 1006 Bytes
/
ray.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
53
#ifndef RAY_H
#define RAY_H
// Dependencies
#include "lineo.h"
#include "wall.h"
// Libraries
#include "math.h"
#include <vector>
class lineo;
class ray: public lineo
{
private:
int state; // 0 for direct ray, 1 for transmitted ray, 2 for reflected ray, 3 for refracted ray
// Coefficients
double T; // Transmission coefficient
double G; // Reflection coefficient
int wallInd;
double tetai ;
double meterLength;
int wallIBouncedOn;
std::vector <wall*> walls_intersected; // Pas la meilleure approche, trop à enregsitrer.
void updateMeterLength();
public:
ray(int x01 = 0, int y01 = 0, int x02 = 0, int y02 = 0,double tetai = 0,int indWall = 0, room *scene = 0);
// Getters && Setters
void updateLength(double length_inWall);
double getCoefficient();
int getWallInd();
void setCoefficient(double iAngle, wall inWall);
double getTetai();
double getMeterLength();
int getIndWall();
};
#endif // RAY_H