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

This class provides all functionalities for the base raytracing code. It follows all rays from all light sources through the scene. More...

#include <raytrace.h>

Inheritance diagram for GOAT::raytracing::Raytrace:
GOAT::raytracing::Raytrace_Field GOAT::raytracing::Raytrace_Field_usp GOAT::raytracing::Raytrace_Inel GOAT::raytracing::Raytrace_Inel GOAT::raytracing::Raytrace_OT GOAT::raytracing::Raytrace_OT GOAT::raytracing::Raytrace_Path GOAT::raytracing::Raytrace_Path GOAT::raytracing::Raytrace_pure GOAT::raytracing::Raytrace_pure GOAT::raytracing::Raytrace_usp GOAT::raytracing::Raytrace_usp_rt

Public Member Functions

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 traceEnterObject ()=0
 this function is called when the ray enters an object
virtual void traceEnterObject ()=0
 this function is called when the ray enters an object
virtual void traceLeaveObject ()=0
 this function is called when the ray leaves an object
virtual void traceLeaveObject ()=0
 this function is called when the ray leaves an object
virtual void traceStopObject ()
virtual void traceStopObject ()
virtual void traceOneRay (RayBase *ray, int &Reflexions, int &recur)
 traces one ray
virtual void reset ()
void copyRay (RayBase *&dest, RayBase *src)

Public Attributes

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
virtual void traceOneRay (RayBase *ray, int &Reflexions, int &recur)
 traces one ray
virtual void reset ()
void copyRay (RayBase *&dest, RayBase *src)

Detailed Description

This class provides all functionalities for the base raytracing code. It follows all rays from all light sources through the scene.

The calculation space is determined by sphere with the radius r0. The Scene class is used to describe the position and types of the light sources (derived from class LightSrc) and objects (derived from ObjectShape). In the moment, objects are extended volume object only. Area objects, like mirrors or detectors are not implemented yet. Besides the starting and end points of each step, the electric field strength of the ray at the beginning and the end of the step is stored for further calculation in derived classes. Also, the direction of the incident, the reflected and the transmitted ray is given.

Definition at line 85 of file raytrace.h.

Constructor & Destructor Documentation

◆ Raytrace() [1/4]

GOAT::raytracing::Raytrace::Raytrace ( )

◆ Raytrace() [2/4]

GOAT::raytracing::Raytrace::Raytrace ( const Scene & S)

◆ Raytrace() [3/4]

GOAT::raytracing::Raytrace::Raytrace ( )

◆ Raytrace() [4/4]

GOAT::raytracing::Raytrace::Raytrace ( const Scene & S)

Member Function Documentation

◆ copyRay() [1/2]

void GOAT::raytracing::Raytrace::copyRay ( RayBase *& dest,
RayBase * src )

◆ copyRay() [2/2]

void GOAT::raytracing::Raytrace::copyRay ( RayBase *& dest,
RayBase * src )

◆ init() [1/2]

void GOAT::raytracing::Raytrace::init ( )

this function is called if no object was hidden

Initializes all values for the beginning of the Raytracing process

◆ init() [2/2]

void GOAT::raytracing::Raytrace::init ( )

this function is called if no object was hidden

Initializes all values for the beginning of the Raytracing process

◆ reset() [1/2]

virtual void GOAT::raytracing::Raytrace::reset ( )
virtual

◆ reset() [2/2]

virtual void GOAT::raytracing::Raytrace::reset ( )
virtual

◆ setNumReflex() [1/2]

void GOAT::raytracing::Raytrace::setNumReflex ( int numReflex)

sets number of reflexions

◆ setNumReflex() [2/2]

void GOAT::raytracing::Raytrace::setNumReflex ( int numReflex)

sets number of reflexions

◆ setScene() [1/2]

void GOAT::raytracing::Raytrace::setScene ( const Scene & S)

sets Scene

◆ setScene() [2/2]

void GOAT::raytracing::Raytrace::setScene ( const Scene & S)

sets Scene

◆ trace() [1/2]

void GOAT::raytracing::Raytrace::trace ( )

this is the starting point for the raytracing procedure

◆ trace() [2/2]

void GOAT::raytracing::Raytrace::trace ( )

this is the starting point for the raytracing procedure

◆ traceEnterObject() [1/2]

◆ traceEnterObject() [2/2]

◆ traceLeaveObject() [1/2]

◆ traceLeaveObject() [2/2]

◆ traceOneRay() [1/2]

virtual void GOAT::raytracing::Raytrace::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 in GOAT::raytracing::Raytrace_Field, and GOAT::raytracing::Raytrace_Field_usp.

◆ traceOneRay() [2/2]

virtual void GOAT::raytracing::Raytrace::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 in GOAT::raytracing::Raytrace_Field, and GOAT::raytracing::Raytrace_Field_usp.

◆ traceStopObject() [1/2]

virtual void GOAT::raytracing::Raytrace::traceStopObject ( )
inlinevirtual

Reimplemented in GOAT::raytracing::Raytrace_Path, and GOAT::raytracing::Raytrace_Path.

Definition at line 95 of file raytrace.h.

◆ traceStopObject() [2/2]

virtual void GOAT::raytracing::Raytrace::traceStopObject ( )
inlinevirtual

Reimplemented in GOAT::raytracing::Raytrace_Path, and GOAT::raytracing::Raytrace_Path.

Definition at line 88 of file raytrace.h.

Member Data Documentation

◆ Abbruch

bool GOAT::raytracing::Raytrace::Abbruch

flag to stop calculation

Definition at line 128 of file raytrace.h.

◆ currentIndex

GOAT::maths::Vector< INDEX_TYPE > GOAT::raytracing::Raytrace::currentIndex = GOAT::maths::Vector<INDEX_TYPE>(-1, -1, -1)

Definition at line 100 of file raytrace.h.

◆ currentLS

int GOAT::raytracing::Raytrace::currentLS

Number of the current light source, which is currently in the calculation process.

Definition at line 99 of file raytrace.h.

◆ currentObj

int GOAT::raytracing::Raytrace::currentObj

Number of the last object hit (no object hit: -1)

Definition at line 98 of file raytrace.h.

◆ EStart

maths::Vector< std::complex< double > > GOAT::raytracing::Raytrace::EStart

Definition at line 102 of file raytrace.h.

◆ EStart2

maths::Vector< std::complex< double > > GOAT::raytracing::Raytrace::EStart2

Definition at line 103 of file raytrace.h.

◆ EStop

maths::Vector< std::complex< double > > GOAT::raytracing::Raytrace::EStop

Start and end value of the electric field.

Definition at line 102 of file raytrace.h.

◆ EStop2

maths::Vector< std::complex< double > > GOAT::raytracing::Raytrace::EStop2

Start and end value of the electric field (second ray in IRay)

Definition at line 103 of file raytrace.h.

◆ kin

maths::Vector< double > GOAT::raytracing::Raytrace::kin

direction of the incident ray

last hit with the objects surface: normalized direction of the incident, the reflected and the transmitted ray *‍/

Definition at line 107 of file raytrace.h.

◆ kref

maths::Vector< double > GOAT::raytracing::Raytrace::kref

direction of the reflected ray

Definition at line 108 of file raytrace.h.

◆ ktrans

maths::Vector< double > GOAT::raytracing::Raytrace::ktrans

direction of the transmitted ray

Definition at line 109 of file raytrace.h.

◆ lost

int GOAT::raytracing::Raytrace::lost

Rays unintentionally get lost, e.g. due to total internal reflection.

Definition at line 97 of file raytrace.h.

◆ numReflex

int GOAT::raytracing::Raytrace::numReflex = RAYTRACE_MAX_REFLEXIONS

current number of reflections

Definition at line 129 of file raytrace.h.

◆ PowIn

double GOAT::raytracing::Raytrace::PowIn

Power of the incident ray.

Definition at line 114 of file raytrace.h.

◆ PowRef

double GOAT::raytracing::Raytrace::PowRef

Powers stored when ray type is PRay.

Power of the reflected ray

Definition at line 113 of file raytrace.h.

◆ PowTrans

double GOAT::raytracing::Raytrace::PowTrans

Power of the transmitted ray.

Definition at line 115 of file raytrace.h.

◆ PStart

maths::Vector< double > GOAT::raytracing::Raytrace::PStart

Definition at line 101 of file raytrace.h.

◆ PStop

maths::Vector< double > GOAT::raytracing::Raytrace::PStop

Start and end point of the last step.

Definition at line 101 of file raytrace.h.

◆ ray

RayBase * GOAT::raytracing::Raytrace::ray

current ray

Definition at line 126 of file raytrace.h.

◆ S

Scene GOAT::raytracing::Raytrace::S

Description of the scene.

Definition at line 116 of file raytrace.h.

◆ tray

RayBase * GOAT::raytracing::Raytrace::tray

transmitted ray

Definition at line 127 of file raytrace.h.

◆ type

int GOAT::raytracing::Raytrace::type =RAYTRACER_TYPE_NONE

Flag which shows which type of raytracer is selected.

Definition at line 118 of file raytrace.h.

◆ useRRTParms

bool GOAT::raytracing::Raytrace::useRRTParms

Flag which tells the raytracing procedure if the RRT parameters of scene or the normal parameters are used within the calculation.

Definition at line 117 of file raytrace.h.


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