-
Notifications
You must be signed in to change notification settings - Fork 0
/
ray.h
43 lines (35 loc) · 1.1 KB
/
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
#include <eigen3/Eigen/Core>
#include <vector>
#include <utility>
#ifndef RAY_H
#define RAY_H
typedef Eigen::Matrix<std::complex<double>, 2, 1> Vector2cd;
typedef std::vector<Eigen::Matrix<std::complex<double>, 2, 2, 0, 2, 2>>
ListMatrix4cd;
typedef Eigen::Matrix<std::complex<double>, 2, 2, 0, 2, 2> Matrix4cd;
/*!
* \brief The Ray class
* This defines all the methods the ray will implement.
*/
class Ray {
Eigen::Vector3d m_origin;
Eigen::Vector3d m_direction;
Matrix4cd m_polarisation;
Matrix4cd m_calculationMatrix;
Eigen::Vector2d m_targetPolarisation;
public:
Ray(Eigen::Vector3d origin, Eigen::Vector3d direction, Matrix4cd polarisation,
Eigen::Vector2d targetPolarisation);
~Ray();
Eigen::Vector3d getOrigin();
Eigen::Vector3d getDirection();
Matrix4cd getPolarisation();
Matrix4cd getCalculationMatrix();
double getWaveLength();
void setOrigin(Eigen::Vector3d origin);
void setDirection(Eigen::Vector3d direction);
void setPolarisation(Matrix4cd polarisation);
void calculationMatrixMultiplication(Matrix4cd &x);
void flipPolarization();
};
#endif // RAY_H