50 std::complex<double>
n0,
double r0,
double k0,
51 const int numObj = 0, std::vector<ObjectShape*> obj = std::vector<ObjectShape*>() );
This class represents a threedimensional (numeric) Matrix as a template.
Template class for threedimensional vectors.
maths::Vector< std::complex< double > > Pol2()
direction of the second polarisation
maths::Vector< double > OK
void reflectRay(RayBase *&tray, maths::Vector< double > n, std::complex< double > n1, std::complex< double > n2)
Reflects ray on the surface /param tray Transmitted (=refracted) ray /param n Surface normal /param n...
maths::Vector< double > k
current direction
void refract(maths::Vector< double > N, std::complex< double > n1, std::complex< double > n2)
This function refracts the ray on the surface.
void setRefract(std::complex< double > n)
Sets the current refractive index.
maths::Vector< double > P
current position
int currentObjectIndex()
returns the index of the hidden object or -1
maths::Vector< std::complex< double > > getE()
gives back electric field strength
std::complex< double > getRefract()
Returns the current refractive index.
IRay reflect(maths::Vector< double > n, std::complex< double > n1, std::complex< double > n2)
This function reflects ray on the surface. Here, the ray is reflected and the transmitted ray is crea...
void setP(const maths::Vector< double > &p)
Current position of the ray.
maths::Vector< double > getP()
Returns the current position of the ray.
bool checkObjectIntersection(int &Index, maths::Vector< double > &Pmin)
void initElectricFieldGauss(maths::Vector< std::complex< double > > &Pol, Gauss g)
Initialises the ray for gaussian beam with help of the plane Eb and the polarisation vector Pol (seco...
maths::Matrix< std::complex< double > > Fresnel_reflect(double alpha, std::complex< double > n1, std::complex< double > n2)
returns Fresnel matrix for the reflection calculation (alpha: angle of incidence, n1,...
maths::Vector< double > intersectRect(const maths::Vector< double > P, const maths::Vector< double > e1, const maths::Vector< double > e2)
double cross(const maths::Vector< double > P10, const maths::Vector< double > P11, const maths::Vector< double > P20, const maths::Vector< double > P21)
void setk(const maths::Vector< double > &K)
Sets the direction of the ray.
IRay(const maths::Vector< double > &p, const maths::Vector< std::complex< double > > &Pol, const maths::Vector< double > &K, std::complex< double > n0, double r0, double k0, const int numObj=0, std::vector< ObjectShape * > obj=std::vector< ObjectShape * >())
Contructor.
void initElectricField(const Plane &Eb, const maths::Vector< std::complex< double > > &Pol1, const maths::Vector< std::complex< double > > &Pol2, const int AnzRays)
void initElectricField(const Plane &Eb, const maths::Vector< std::complex< double > > &Pol, const int numOfRays=1)
initialises the electric field with help of the Plane Eb and the polarisation Pol,...
void initElectricField(const maths::Vector< std::complex< double > > &PolS, const maths::Vector< std::complex< double > > &PolP, const int AnzRays)
initialises the electric field vectors with help of polarisation vectors PolS and PolP,...
maths::Matrix< std::complex< double > > Fresnel_trans(double alpha, std::complex< double > beta, std::complex< double > n1, std::complex< double > n2)
returns Fresnel matrix for the transmission calculation (alpha: angle of incidence,...
ObjectShape * getObject(int i)
Returns the i-th object (for internal use only)
bool next()
make the next step (has to include phase progress)
maths::Vector< std::complex< double > > Pol1()
direction of the first polarisation
int objectIndex()
Returns the index of the last hidden object (or -1 if no object was hidden)
maths::Vector< std::complex< double > > E2
electric fields
maths::Vector< std::complex< double > > E1
void setiR(int i)
Sets the current reflexion counter (for internal use only)
bool isInObject()
Returns true if ray is inside an object.
maths::Vector< double > crossPlane(const maths::Vector< double > Pe, const maths::Vector< double > n)
calculates the intersection point between the ray and a plane, which is defined by the vector P and t...
int reflections()
Returns the number of reflections the beam has already passed through.
maths::Vector< double > getk()
Returns the direction of the ray.
void initElectricFieldGauss(const Plane &Eb, const maths::Vector< std::complex< double > > &PolS, const maths::Vector< std::complex< double > > &PolP, Gauss g)
Initialises the ray for gaussian beam with help of the plane Eb and the polarisation vectors PolS and...
friend std::ostream & operator<<(std::ostream &os, IRay S)
void initElectricFieldGauss(double sigma2, maths::Vector< double > focuspos, maths::Vector< std::complex< double > > Pol)
Abstract base class for all volume objects This abstract class provides a template for all volume obj...
Abstract base class for all rays used for the raytracing process. This abstract base class for all ra...
int objIndex
index of the current object
std::complex< double > n0
current refractive index and refractive index of the host material
bool inObject
is in an object
int numObj
number of objects
std::vector< ObjectShape * > Obj
list of all objects
bool suppress_phase_progress
suppress phase change in next(), needed for short pulse consideration
RayBase * tray
transmitted ray (used by the raytracer, for internal use only)
int iR
number of reflections already done
This file contains the definition of a template for 3x3 matrices, which can be used together with the...
Raytracer used for ultrashort pulse calculation with raytracing only.
This class is used for the iray class. This class is intended for internal use only....
This file contains the Vector template class and some useful functions around this class.