15 #define RAYTRACER_TYPE_NONE 0
16 #define RAYTRACER_TYPE_PATH 1
17 #define RAYTRACER_TYPE_OT 2
18 #define RAYTRACER_TYPE_PURE 3
20 #define MAX_RECURSIONS 20
21 #define RAYTRACE_MAX_REFLEXIONS 2
58 std::vector<ObjectShape*>
Obj;
59 std::vector<LightSrc*>
LS;
61 std::vector< Detector*>
Det;
66 std::complex<double>
nS;
166 std::vector<maths::Vector<double>>
P1;
167 std::vector<maths::Vector<double>>
P2;
Template class for threedimensional vectors.
The abstract Detector class provides an interface to a detector to store the information about the el...
This abstract class is the basic class for all light sources used in this raytracing library....
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...
maths::Vector< double > ** f
list of the forces acting on the objects, separated for the different light sources
void traceEnterObject()
force calculation, when the ray enters an object
maths::Vector< double > * F
list of the forces acting on the objects
void setScene(const Scene &S)
void traceLeaveObject()
force calculation, when the ray leaves an object
maths::Vector< double > * L
angular momenta acting on the objects
maths::Vector< double > ** l
list of the angular momenta acting on the objects, separated for the different light sources
std::vector< maths::Vector< double > > P2
Here, the ending points of each step are stored if no filename is given.
bool getShowOutgoingRays()
Returns true, if Rays, which going out of an object without hidding a second one will be stored.
void setShowOutgoingRays(bool show)
if true, Rays, which going out of an object without hidding a second one will be stored
Raytrace_Path(Scene)
Constructor with Scene Object.
void traceEnterObject()
this function is called when the ray enters an object
int numRays
Number of rays stored.
void trace(std::string FName)
Starting point of the raytracing with the filename where the data will be stored.
void traceLeaveObject()
this function is called when the ray leaves an object
std::vector< maths::Vector< double > > P1
Here, the starting points of each step are stored if no filename is given.
void trace()
If no Filename is given, the starting and endpoint of each ray step is stored in two arrays named P1 ...
void traceEnterObject()
this function is called when the ray enters an object
Raytrace_pure(const Scene &)
Constructor with Scene Object.
void traceLeaveObject()
this function is called when the ray leaves an object
bool useRRTParms
Flag which tells the raytracing procedure if the RRT parameters of scene or the normal parameters are...
virtual void traceOneRay(RayBase *ray, int &Reflexions, int &recur)
traces one ray
maths::Vector< std::complex< double > > EStop2
Start and end value of the electric field (second ray in IRay)
maths::Vector< std::complex< double > > EStop
Start and end value of the electric field.
int currentObj
Number of the last object hit (no object hit: -1)
maths::Vector< double > PStart
void setNumReflex(int numReflex)
sets number of reflexions
RayBase * tray
transmitted ray
double PowIn
Power of the incident ray.
double PowTrans
Power of the transmitted ray.
int currentLS
Number of the current light source, which is currently in the calculation process.
maths::Vector< double > ktrans
direction of the transmitted ray
virtual void traceEnterObject()=0
this function is called when the ray enters an object
Scene S
Description of the scene.
maths::Vector< double > kin
direction of the incident ray
maths::Vector< double > kref
direction of the reflected ray
void init()
this function is called if no object was hidden
virtual void traceStopObject()
virtual void traceLeaveObject()=0
this function is called when the ray leaves an object
void trace()
this is the starting point for the raytracing procedure
double PowRef
Powers stored when ray type is PRay.
void setScene(const Scene &S)
sets Scene
int lost
Rays unintentionally get lost, e.g. due to total internal reflection.
GOAT::maths::Vector< INDEX_TYPE > currentIndex
bool Abbruch
flag to stop calculation
maths::Vector< std::complex< double > > EStart2
maths::Vector< double > PStop
Start and end point of the last step.
int type
Flag which shows which type of raytracer is selected.
void copyRay(RayBase *&dest, RayBase *src)
int numReflex
current number of reflections
maths::Vector< std::complex< double > > EStart
Class defining a scene with lightsources and objects. This is a container used to inform the Raytrace...
bool suppress_phase_progress
If true, phase progress is skipped. This is needed for short pulse calculations.
INDEX_TYPE getNumberOfCellsPerDirection() const
int nDet
Number of detectors.
void addLightSourceList(int nls, std::vector< LightSrc * > ls)
add list of lightsources, nls: number of lightsources
void setnSRRT(std::complex< double > nS)
set the refractive index of the filling material in the scene
void removeAllLightSources()
removes all light sources from the scene
void addObject(ObjectShape *Obj)
add single object to scene
int nLS
Number of light sources.
int nObj
Number of objects in the scene.
double r0
Radius of the calculation space. All rays are followed within this calculation sphere.
void addObjectList(int nobj, std::vector< ObjectShape * > obj)
add a list of objects to scene, nobj: number of objects
void addLightSource(LightSrc *ls, int raytype)
add single lightsource to scene and determine ray type
std::vector< LightSrc * > LS
List of all light sources.
void setNumberOfCellsPerDirection(INDEX_TYPE no)
void removeAllObjects()
removes all objects from the scene
void setPhaseProgress(bool suppress_phase_progress)
LightSrc * LSRRT
Light source for reversed ray tracing (RRT)
int raytype
Type of the rays created by the light source. More detailed information about the available ray types...
void removeLightSrc(int index)
remove one light source from the scene
void setNumReflex(int numReflex)
set the number of reflections per ray considered in the raytracing
void removeDetector(int index)
remove detector "index" from detector list
int testLS()
tests, if all lightsources are outside all objects (return value: -1, if every lightsource is outside...
std::vector< ObjectShape * > Obj
List of all objects within the scene.
Scene()
Standard constructor.
void removeLightSource(LightSrc *ls)
void removeObject(int index)
removes object with index "index" from object list
void setRaytype(int raytype)
set the ray type for all light sources
void removeAllDetectors()
remove all detectors from the scene
void addLightSource(LightSrc *ls)
add single lightsource to scene
void cleanAllDetectors()
clean all detectors, i.e. all detectors are set to zero, but the detectors remain in the scene
int nReflex
Number of reflections.
void removeDetector(Detector *det)
Scene(const Scene &S)
Copy constructor.
void removeObject(ObjectShape *obj)
removes object, identified by its pointer from object list
void addLightSourceRRT(LightSrc *ls, maths::Vector< std::complex< double > >Pol1, maths::Vector< std::complex< double > >Pol2)
std::complex< double > nSRRT
refractive index of the surrounding medium (RRT), i.e. the medium between the objects
void setnS(std::complex< double > nS)
set the refractive index of the filling material in the scene
void addDetector(Detector *D)
add single detector to scene
INDEX_TYPE NumCellsPerDir
Number of cells per direction, used e.g. in raytrace_Inel for the virtual space grid.
std::vector< Detector * > Det
List of detectors, which are storing the electric field inside a defined area.
void addDetectorList(int nDet, std::vector< Detector * > D)
add a list of detectors to the scene, nDet: number of detectors to add
void setr0(double r0)
set the radius of the calculation space
std::complex< double > nS
refractive index of the surrounding medium, i.e. the medium between the objects
void resetLS()
reset all light sources. That means the counters for the rays within of the light sources are set to ...
#define LIGHTSRC_RAYTYPE_IRAY
Ray class : IRay.
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....
#define RAYTRACER_TYPE_NONE
#define RAYTRACE_MAX_REFLEXIONS
This file contains the Vector template class and some useful functions around this class.