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

Class defining a scene with lightsources and objects. This is a container used to inform the Raytracer about all necessary settings. Here, all informations about light sources and objects are stored. Light sources are described by classes derived from the virtual LightSrc base class. All objects are described by classes derived from the virtual class ObjectShape. More...

#include <raytrace.h>

Public Member Functions

void addDetector (Detector *D)
 add single detector to scene
void addDetector (Detector *D)
 add single detector to scene
void addDetectorList (int nDet, std::vector< Detector * > D)
 add a list of detectors to the scene, nDet: number of detectors to add
void addDetectorList (int nDet, std::vector< Detector * > D)
 add a list of detectors to the scene, nDet: number of detectors to add
void addLightSource (LightSrc *ls)
 add single lightsource to scene
void addLightSource (LightSrc *ls)
 add single lightsource to scene
void addLightSource (LightSrc *ls, int raytype)
 add single lightsource to scene and determine ray type
void addLightSource (LightSrc *ls, int raytype)
 add single lightsource to scene and determine ray type
void addLightSourceList (int nls, std::vector< LightSrc * > ls)
 add list of lightsources, nls: number of lightsources
void addLightSourceList (int nls, std::vector< LightSrc * > ls)
 add list of lightsources, nls: number of lightsources
void addLightSourceRRT (LightSrc *ls, maths::Vector< std::complex< double > >Pol1, maths::Vector< std::complex< double > >Pol2)
void addLightSourceRRT (LightSrc *ls, maths::Vector< std::complex< double > >Pol1, maths::Vector< std::complex< double > >Pol2)
void addObject (ObjectShape *Obj)
 add single object to scene
void addObject (ObjectShape *Obj)
 add single object to scene
void addObjectList (int nobj, std::vector< ObjectShape * > obj)
 add a list of objects to scene, nobj: number of objects
void addObjectList (int nobj, std::vector< ObjectShape * > obj)
 add a list of objects to scene, nobj: number of objects
void cleanAllDetectors ()
 clean all detectors, i.e. all detectors are set to zero, but the detectors remain in the scene
void cleanAllDetectors ()
 clean all detectors, i.e. all detectors are set to zero, but the detectors remain in the scene
INDEX_TYPE getNumberOfCellsPerDirection () const
void removeAllDetectors ()
 remove all detectors from the scene
void removeAllDetectors ()
 remove all detectors from the scene
void removeAllLightSources ()
 removes all light sources from the scene
void removeAllLightSources ()
 removes all light sources from the scene
void removeAllObjects ()
 removes all objects from the scene
void removeAllObjects ()
 removes all objects from the scene
void removeDetector (Detector *det)
void removeDetector (int index)
 remove detector "index" from detector list
void removeDetector (int index)
 remove detector "index" from detector list
void removeLightSource (LightSrc *ls)
void removeLightSrc (int index)
 remove one light source from the scene
void removeLightSrc (int index)
 remove one light source from the scene
void removeObject (int index)
 removes object with index "index" from object list
void removeObject (int index)
 removes object with index "index" from object list
void removeObject (ObjectShape *obj)
 removes object, identified by its pointer from object list
void removeObject (ObjectShape *obj)
 removes object, identified by its pointer from object list
void resetLS ()
 reset all light sources. That means the counters for the rays within of the light sources are set to the first ray
void resetLS ()
 reset all light sources. That means the counters for the rays within of the light sources are set to the first ray
 Scene ()
 Standard constructor.
 Scene ()
 Standard constructor.
 Scene (const Scene &S)
 Copy constructor.
 Scene (const Scene &S)
 Copy constructor.
void setnS (std::complex< double > nS)
 set the refractive index of the filling material in the scene
void setnS (std::complex< double > nS)
 set the refractive index of the filling material in the scene
void setnSRRT (std::complex< double > nS)
 set the refractive index of the filling material in the scene
void setnSRRT (std::complex< double > nS)
 set the refractive index of the filling material in the scene
void setNumberOfCellsPerDirection (INDEX_TYPE no)
void setNumReflex (int numReflex)
 set the number of reflections per ray considered in the raytracing
void setPhaseProgress (bool suppress_phase_progress)
void setPhaseProgress (bool suppress_phase_progress)
void setr0 (double r0)
 set the radius of the calculation space
void setr0 (double r0)
 set the radius of the calculation space
void setRaytype (int raytype)
 set the ray type for all light sources
void setRaytype (int raytype)
 set the ray type for all light sources
int testLS ()
 tests, if all lightsources are outside all objects (return value: -1, if every lightsource is outside, >=0: number of the first lightsource which is inside)
int testLS ()
 tests, if all lightsources are outside all objects (return value: -1, if every lightsource is outside, >=0: number of the first lightsource which is inside)

Public Attributes

std::vector< Detector * > Det
 List of detectors, which are storing the electric field inside a defined area.
std::vector< LightSrc * > LS
 List of all light sources.
LightSrcLSRRT
 Light source for reversed ray tracing (RRT)
int nDet = 0
 Number of detectors.
int nLS = 0
 Number of light sources.
int nObj = 0
 Number of objects in the scene.
int nReflex = 0
 Number of reflections.
std::complex< double > nS
 refractive index of the surrounding medium, i.e. the medium between the objects
std::complex< double > nSRRT
 refractive index of the surrounding medium (RRT), i.e. the medium between the objects
INDEX_TYPE NumCellsPerDir = 1
 Number of cells per direction, used e.g. in raytrace_Inel for the virtual space grid.
std::vector< ObjectShape * > Obj
 List of all objects within the scene.
double r0 =1000
 Radius of the calculation space. All rays are followed within this calculation sphere.
int raytype =LIGHTSRC_RAYTYPE_IRAY
 Type of the rays created by the light source. More detailed information about the available ray types and their meaning is provided.
bool suppress_phase_progress = false
 If true, phase progress is skipped. This is needed for short pulse calculations.

Detailed Description

Class defining a scene with lightsources and objects. This is a container used to inform the Raytracer about all necessary settings. Here, all informations about light sources and objects are stored. Light sources are described by classes derived from the virtual LightSrc base class. All objects are described by classes derived from the virtual class ObjectShape.

Definition at line 27 of file raytrace.h.

Constructor & Destructor Documentation

◆ Scene() [1/4]

GOAT::raytracing::Scene::Scene ( )

Standard constructor.

◆ Scene() [2/4]

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

Copy constructor.

◆ Scene() [3/4]

GOAT::raytracing::Scene::Scene ( )

Standard constructor.

◆ Scene() [4/4]

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

Copy constructor.

Member Function Documentation

◆ addDetector() [1/2]

void GOAT::raytracing::Scene::addDetector ( Detector * D)

add single detector to scene

◆ addDetector() [2/2]

void GOAT::raytracing::Scene::addDetector ( Detector * D)

add single detector to scene

◆ addDetectorList() [1/2]

void GOAT::raytracing::Scene::addDetectorList ( int nDet,
std::vector< Detector * > D )

add a list of detectors to the scene, nDet: number of detectors to add

◆ addDetectorList() [2/2]

void GOAT::raytracing::Scene::addDetectorList ( int nDet,
std::vector< Detector * > D )

add a list of detectors to the scene, nDet: number of detectors to add

◆ addLightSource() [1/4]

void GOAT::raytracing::Scene::addLightSource ( LightSrc * ls)
inline

add single lightsource to scene

Definition at line 38 of file raytrace.h.

◆ addLightSource() [2/4]

void GOAT::raytracing::Scene::addLightSource ( LightSrc * ls)
inline

add single lightsource to scene

Definition at line 38 of file raytrace.h.

◆ addLightSource() [3/4]

void GOAT::raytracing::Scene::addLightSource ( LightSrc * ls,
int raytype )

add single lightsource to scene and determine ray type

◆ addLightSource() [4/4]

void GOAT::raytracing::Scene::addLightSource ( LightSrc * ls,
int raytype )

add single lightsource to scene and determine ray type

◆ addLightSourceList() [1/2]

void GOAT::raytracing::Scene::addLightSourceList ( int nls,
std::vector< LightSrc * > ls )

add list of lightsources, nls: number of lightsources

◆ addLightSourceList() [2/2]

void GOAT::raytracing::Scene::addLightSourceList ( int nls,
std::vector< LightSrc * > ls )

add list of lightsources, nls: number of lightsources

◆ addLightSourceRRT() [1/2]

void GOAT::raytracing::Scene::addLightSourceRRT ( LightSrc * ls,
maths::Vector< std::complex< double > > Pol1,
maths::Vector< std::complex< double > > Pol2 )

◆ addLightSourceRRT() [2/2]

void GOAT::raytracing::Scene::addLightSourceRRT ( LightSrc * ls,
maths::Vector< std::complex< double > > Pol1,
maths::Vector< std::complex< double > > Pol2 )

◆ addObject() [1/2]

void GOAT::raytracing::Scene::addObject ( ObjectShape * Obj)

add single object to scene

◆ addObject() [2/2]

void GOAT::raytracing::Scene::addObject ( ObjectShape * Obj)

add single object to scene

◆ addObjectList() [1/2]

void GOAT::raytracing::Scene::addObjectList ( int nobj,
std::vector< ObjectShape * > obj )

add a list of objects to scene, nobj: number of objects

◆ addObjectList() [2/2]

void GOAT::raytracing::Scene::addObjectList ( int nobj,
std::vector< ObjectShape * > obj )

add a list of objects to scene, nobj: number of objects

◆ cleanAllDetectors() [1/2]

void GOAT::raytracing::Scene::cleanAllDetectors ( )

clean all detectors, i.e. all detectors are set to zero, but the detectors remain in the scene

◆ cleanAllDetectors() [2/2]

void GOAT::raytracing::Scene::cleanAllDetectors ( )

clean all detectors, i.e. all detectors are set to zero, but the detectors remain in the scene

◆ getNumberOfCellsPerDirection()

INDEX_TYPE GOAT::raytracing::Scene::getNumberOfCellsPerDirection ( ) const
inline

Definition at line 72 of file raytrace.h.

◆ removeAllDetectors() [1/2]

void GOAT::raytracing::Scene::removeAllDetectors ( )

remove all detectors from the scene

◆ removeAllDetectors() [2/2]

void GOAT::raytracing::Scene::removeAllDetectors ( )

remove all detectors from the scene

◆ removeAllLightSources() [1/2]

void GOAT::raytracing::Scene::removeAllLightSources ( )

removes all light sources from the scene

◆ removeAllLightSources() [2/2]

void GOAT::raytracing::Scene::removeAllLightSources ( )

removes all light sources from the scene

◆ removeAllObjects() [1/2]

void GOAT::raytracing::Scene::removeAllObjects ( )

removes all objects from the scene

◆ removeAllObjects() [2/2]

void GOAT::raytracing::Scene::removeAllObjects ( )

removes all objects from the scene

◆ removeDetector() [1/3]

void GOAT::raytracing::Scene::removeDetector ( Detector * det)

◆ removeDetector() [2/3]

void GOAT::raytracing::Scene::removeDetector ( int index)

remove detector "index" from detector list

◆ removeDetector() [3/3]

void GOAT::raytracing::Scene::removeDetector ( int index)

remove detector "index" from detector list

◆ removeLightSource()

void GOAT::raytracing::Scene::removeLightSource ( LightSrc * ls)

◆ removeLightSrc() [1/2]

void GOAT::raytracing::Scene::removeLightSrc ( int index)

remove one light source from the scene

◆ removeLightSrc() [2/2]

void GOAT::raytracing::Scene::removeLightSrc ( int index)

remove one light source from the scene

◆ removeObject() [1/4]

void GOAT::raytracing::Scene::removeObject ( int index)

removes object with index "index" from object list

◆ removeObject() [2/4]

void GOAT::raytracing::Scene::removeObject ( int index)

removes object with index "index" from object list

◆ removeObject() [3/4]

void GOAT::raytracing::Scene::removeObject ( ObjectShape * obj)

removes object, identified by its pointer from object list

◆ removeObject() [4/4]

void GOAT::raytracing::Scene::removeObject ( ObjectShape * obj)

removes object, identified by its pointer from object list

◆ resetLS() [1/2]

void GOAT::raytracing::Scene::resetLS ( )

reset all light sources. That means the counters for the rays within of the light sources are set to the first ray

◆ resetLS() [2/2]

void GOAT::raytracing::Scene::resetLS ( )

reset all light sources. That means the counters for the rays within of the light sources are set to the first ray

◆ setnS() [1/2]

void GOAT::raytracing::Scene::setnS ( std::complex< double > nS)

set the refractive index of the filling material in the scene

◆ setnS() [2/2]

void GOAT::raytracing::Scene::setnS ( std::complex< double > nS)

set the refractive index of the filling material in the scene

◆ setnSRRT() [1/2]

void GOAT::raytracing::Scene::setnSRRT ( std::complex< double > nS)

set the refractive index of the filling material in the scene

◆ setnSRRT() [2/2]

void GOAT::raytracing::Scene::setnSRRT ( std::complex< double > nS)

set the refractive index of the filling material in the scene

◆ setNumberOfCellsPerDirection()

void GOAT::raytracing::Scene::setNumberOfCellsPerDirection ( INDEX_TYPE no)
inline

Definition at line 73 of file raytrace.h.

◆ setNumReflex()

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

set the number of reflections per ray considered in the raytracing

◆ setPhaseProgress() [1/2]

void GOAT::raytracing::Scene::setPhaseProgress ( bool suppress_phase_progress)

◆ setPhaseProgress() [2/2]

void GOAT::raytracing::Scene::setPhaseProgress ( bool suppress_phase_progress)

◆ setr0() [1/2]

void GOAT::raytracing::Scene::setr0 ( double r0)

set the radius of the calculation space

◆ setr0() [2/2]

void GOAT::raytracing::Scene::setr0 ( double r0)

set the radius of the calculation space

◆ setRaytype() [1/2]

void GOAT::raytracing::Scene::setRaytype ( int raytype)

set the ray type for all light sources

◆ setRaytype() [2/2]

void GOAT::raytracing::Scene::setRaytype ( int raytype)

set the ray type for all light sources

◆ testLS() [1/2]

int GOAT::raytracing::Scene::testLS ( )

tests, if all lightsources are outside all objects (return value: -1, if every lightsource is outside, >=0: number of the first lightsource which is inside)

◆ testLS() [2/2]

int GOAT::raytracing::Scene::testLS ( )

tests, if all lightsources are outside all objects (return value: -1, if every lightsource is outside, >=0: number of the first lightsource which is inside)

Member Data Documentation

◆ Det

std::vector< Detector * > GOAT::raytracing::Scene::Det

List of detectors, which are storing the electric field inside a defined area.

Definition at line 61 of file raytrace.h.

◆ LS

std::vector< LightSrc * > GOAT::raytracing::Scene::LS

List of all light sources.

Definition at line 59 of file raytrace.h.

◆ LSRRT

LightSrc * GOAT::raytracing::Scene::LSRRT

Light source for reversed ray tracing (RRT)

Definition at line 60 of file raytrace.h.

◆ nDet

int GOAT::raytracing::Scene::nDet = 0

Number of detectors.

Definition at line 64 of file raytrace.h.

◆ nLS

int GOAT::raytracing::Scene::nLS = 0

Number of light sources.

Definition at line 63 of file raytrace.h.

◆ nObj

int GOAT::raytracing::Scene::nObj = 0

Number of objects in the scene.

Definition at line 62 of file raytrace.h.

◆ nReflex

int GOAT::raytracing::Scene::nReflex = 0

Number of reflections.

Definition at line 65 of file raytrace.h.

◆ nS

std::complex< double > GOAT::raytracing::Scene::nS

refractive index of the surrounding medium, i.e. the medium between the objects

Definition at line 66 of file raytrace.h.

◆ nSRRT

std::complex< double > GOAT::raytracing::Scene::nSRRT

refractive index of the surrounding medium (RRT), i.e. the medium between the objects

Definition at line 67 of file raytrace.h.

◆ NumCellsPerDir

INDEX_TYPE GOAT::raytracing::Scene::NumCellsPerDir = 1

Number of cells per direction, used e.g. in raytrace_Inel for the virtual space grid.

Definition at line 71 of file raytrace.h.

◆ Obj

std::vector< ObjectShape * > GOAT::raytracing::Scene::Obj

List of all objects within the scene.

Definition at line 58 of file raytrace.h.

◆ r0

double GOAT::raytracing::Scene::r0 =1000

Radius of the calculation space. All rays are followed within this calculation sphere.

Definition at line 68 of file raytrace.h.

◆ raytype

int GOAT::raytracing::Scene::raytype =LIGHTSRC_RAYTYPE_IRAY

Type of the rays created by the light source. More detailed information about the available ray types and their meaning is provided.

Definition at line 69 of file raytrace.h.

◆ suppress_phase_progress

bool GOAT::raytracing::Scene::suppress_phase_progress = false

If true, phase progress is skipped. This is needed for short pulse calculations.

Definition at line 70 of file raytrace.h.


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