GOAT (Geometrical optics application tool) 0.1
Loading...
Searching...
No Matches
GOAT::raytracing::Raytrace_Field Class Reference

Class which stores the electric field inside a box This raytracer can store the electric field even if there are objects in at least one box (we will call this box a "box detector"). The different box detectors must not interfere ! (In the moment, this will not be checked!) More...

#include <raytrace_field.h>

Inheritance diagram for GOAT::raytracing::Raytrace_Field:
GOAT::raytracing::Raytrace

Public Member Functions

void addBoxDetector (Box *box)
 add a box as detector
int findBoxDetectorIntersection (maths::Vector< double > P, maths::Vector< double > k, maths::Vector< double > &pout)
virtual void init ()
 do some initialisation (e.g. clear the superarray)
 Raytrace_Field ()
 Raytrace_Field (Scene &S)
void setResolution (double res)
 set the resolution (which will be used for all detectors)
virtual void storeData (maths::Vector< double > PStart, maths::Vector< double > Pen, maths::Vector< std::complex< double > > EStart)
void trace ()
 Start the raytracing process.
void traceEnterObject ()
 this function is called when the ray enters an object
void traceLeaveObject ()
 this function is called when the ray leaves an object
void traceOneRay (RayBase *ray, int &Reflexions, int &recur)
 traces one ray
 ~Raytrace_Field ()
Public Member Functions inherited from GOAT::raytracing::Raytrace
void init ()
 this function is called if no object was hidden
void init ()
 this function is called if no object was hidden
 Raytrace ()
 Raytrace ()
 Raytrace (const Scene &S)
 Raytrace (const Scene &S)
void setNumReflex (int numReflex)
 sets number of reflexions
void setNumReflex (int numReflex)
 sets number of reflexions
void setScene (const Scene &S)
 sets Scene
void setScene (const Scene &S)
 sets Scene
void trace ()
 this is the starting point for the raytracing procedure
void trace ()
 this is the starting point for the raytracing procedure
virtual void traceStopObject ()
virtual void traceStopObject ()
virtual void reset ()
void copyRay (RayBase *&dest, RayBase *src)
virtual void reset ()
void copyRay (RayBase *&dest, RayBase *src)

Public Attributes

std::vector< Box * > BoxDetector
int indexCurrentDetector =-1
int iR = 0
 Number of reflections to consider.
INDEX_TYPE numCellsPerDirection
maths::Vector< double > pDet
double resolution =0.1
SuperArray< maths::Vector< std::complex< double > > > SE
Public Attributes inherited from GOAT::raytracing::Raytrace
GOAT::maths::Vector< INDEX_TYPEcurrentIndex = GOAT::maths::Vector<INDEX_TYPE>(-1, -1, -1)
int currentLS
 Number of the current light source, which is currently in the calculation process.
int currentObj
 Number of the last object hit (no object hit: -1)
maths::Vector< std::complex< double > > EStart
maths::Vector< std::complex< double > > EStart2
maths::Vector< std::complex< double > > EStop
 Start and end value of the electric field.
maths::Vector< std::complex< double > > EStop2
 Start and end value of the electric field (second ray in IRay)
int lost
 Rays unintentionally get lost, e.g. due to total internal reflection.
maths::Vector< double > PStart
maths::Vector< double > PStop
 Start and end point of the last step.
maths::Vector< double > kin
 direction of the incident ray
maths::Vector< double > kref
 direction of the reflected ray
maths::Vector< double > ktrans
 direction of the transmitted ray
double PowRef
 Powers stored when ray type is PRay.
double PowIn
 Power of the incident ray.
double PowTrans
 Power of the transmitted ray.
Scene S
 Description of the scene.
bool useRRTParms
 Flag which tells the raytracing procedure if the RRT parameters of scene or the normal parameters are used within the calculation.
int type =RAYTRACER_TYPE_NONE
 Flag which shows which type of raytracer is selected.
RayBaseray
 current ray
RayBasetray
 transmitted ray
bool Abbruch
 flag to stop calculation
int numReflex = RAYTRACE_MAX_REFLEXIONS
 current number of reflections

Detailed Description

Class which stores the electric field inside a box This raytracer can store the electric field even if there are objects in at least one box (we will call this box a "box detector"). The different box detectors must not interfere ! (In the moment, this will not be checked!)

Definition at line 16 of file raytrace_field.h.

Constructor & Destructor Documentation

◆ Raytrace_Field() [1/2]

GOAT::raytracing::Raytrace_Field::Raytrace_Field ( )

◆ Raytrace_Field() [2/2]

GOAT::raytracing::Raytrace_Field::Raytrace_Field ( Scene & S)

◆ ~Raytrace_Field()

GOAT::raytracing::Raytrace_Field::~Raytrace_Field ( )

Member Function Documentation

◆ addBoxDetector()

void GOAT::raytracing::Raytrace_Field::addBoxDetector ( Box * box)

add a box as detector

◆ findBoxDetectorIntersection()

int GOAT::raytracing::Raytrace_Field::findBoxDetectorIntersection ( maths::Vector< double > P,
maths::Vector< double > k,
maths::Vector< double > & pout )

◆ init()

virtual void GOAT::raytracing::Raytrace_Field::init ( )
virtual

do some initialisation (e.g. clear the superarray)

◆ setResolution()

void GOAT::raytracing::Raytrace_Field::setResolution ( double res)

set the resolution (which will be used for all detectors)

◆ storeData()

virtual void GOAT::raytracing::Raytrace_Field::storeData ( maths::Vector< double > PStart,
maths::Vector< double > Pen,
maths::Vector< std::complex< double > > EStart )
virtual

◆ trace()

void GOAT::raytracing::Raytrace_Field::trace ( )

Start the raytracing process.

◆ traceEnterObject()

void GOAT::raytracing::Raytrace_Field::traceEnterObject ( )
virtual

this function is called when the ray enters an object

Implements GOAT::raytracing::Raytrace.

◆ traceLeaveObject()

void GOAT::raytracing::Raytrace_Field::traceLeaveObject ( )
virtual

this function is called when the ray leaves an object

Implements GOAT::raytracing::Raytrace.

◆ traceOneRay()

void GOAT::raytracing::Raytrace_Field::traceOneRay ( RayBase * ray,
int & Reflexions,
int & recur )
virtual

traces one ray

Parameters
rayray which should be traced,
Reflexionscounter for the number of reflexions made within the ray tracing process. This parameter is needed to stop calculation after the maximal number of reflexions
recurcounter which will be set to the current recursion depth

Reimplemented from GOAT::raytracing::Raytrace.

Member Data Documentation

◆ BoxDetector

std::vector<Box *> GOAT::raytracing::Raytrace_Field::BoxDetector

Definition at line 35 of file raytrace_field.h.

◆ indexCurrentDetector

int GOAT::raytracing::Raytrace_Field::indexCurrentDetector =-1

Definition at line 38 of file raytrace_field.h.

◆ iR

int GOAT::raytracing::Raytrace_Field::iR = 0

Number of reflections to consider.

Definition at line 27 of file raytrace_field.h.

◆ numCellsPerDirection

INDEX_TYPE GOAT::raytracing::Raytrace_Field::numCellsPerDirection

Definition at line 37 of file raytrace_field.h.

◆ pDet

maths::Vector<double> GOAT::raytracing::Raytrace_Field::pDet

Definition at line 39 of file raytrace_field.h.

◆ resolution

double GOAT::raytracing::Raytrace_Field::resolution =0.1

Definition at line 36 of file raytrace_field.h.

◆ SE

SuperArray<maths::Vector<std::complex<double> > > GOAT::raytracing::Raytrace_Field::SE

Definition at line 26 of file raytrace_field.h.


The documentation for this class was generated from the following file: