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

Class which stores the start and end points of each step into a file. More...

#include <raytrace.h>

Inheritance diagram for GOAT::raytracing::Raytrace_Path:
GOAT::raytracing::Raytrace GOAT::raytracing::Raytrace

Public Member Functions

bool getShowOutgoingRays ()
 Returns true, if Rays, which going out of an object without hidding a second one will be stored.
bool getShowOutgoingRays ()
 Returns true, if Rays, which going out of an object without hidding a second one will be stored.
 Raytrace_Path ()
 Raytrace_Path ()
 Raytrace_Path (Scene)
 Constructor with Scene Object.
 Raytrace_Path (Scene)
 Constructor with Scene Object.
void setShowOutgoingRays (bool show)
 if true, 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
void trace ()
 If no Filename is given, the starting and endpoint of each ray step is stored in two arrays named P1 and P2.
void trace ()
 If no Filename is given, the starting and endpoint of each ray step is stored in two arrays named P1 and P2.
void trace (std::string FName)
 Starting point of the raytracing with the filename where the data will be stored.
void trace (std::string FName)
 Starting point of the raytracing with the filename where the data will be stored.
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 traceOneRay (RayBase *ray, int &Reflexions, int &recur)
 traces one ray
virtual void reset ()
void copyRay (RayBase *&dest, RayBase *src)
virtual void traceOneRay (RayBase *ray, int &Reflexions, int &recur)
 traces one ray
virtual void reset ()
void copyRay (RayBase *&dest, RayBase *src)

Public Attributes

int numRays =0
 Number of rays stored.
std::vector< maths::Vector< double > > P1
 Here, the starting points of each step are stored if no filename is given.
std::vector< maths::Vector< double > > P2
 Here, the ending points of each step are stored if no filename is given.
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

Private Member Functions

void storeStep ()
void storeStep ()
void traceEnterObject ()
 this function is called when the ray enters an object
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 traceLeaveObject ()
 this function is called when the ray leaves an object
void traceStopObject ()
void traceStopObject ()

Private Attributes

std::ofstream os
bool showOutgoingRays = true
bool storeInFile = false

Detailed Description

Class which stores the start and end points of each step into a file.

This class stores all rays, which hit an object. Rays which go out of an object without hitting another one or rays which never touch an object are not stored.

Definition at line 157 of file raytrace.h.

Constructor & Destructor Documentation

◆ Raytrace_Path() [1/4]

GOAT::raytracing::Raytrace_Path::Raytrace_Path ( )

◆ Raytrace_Path() [2/4]

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

Constructor with Scene Object.

◆ Raytrace_Path() [3/4]

GOAT::raytracing::Raytrace_Path::Raytrace_Path ( )

◆ Raytrace_Path() [4/4]

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

Constructor with Scene Object.

Member Function Documentation

◆ getShowOutgoingRays() [1/2]

bool GOAT::raytracing::Raytrace_Path::getShowOutgoingRays ( )

Returns true, if Rays, which going out of an object without hidding a second one will be stored.

◆ getShowOutgoingRays() [2/2]

bool GOAT::raytracing::Raytrace_Path::getShowOutgoingRays ( )

Returns true, if Rays, which going out of an object without hidding a second one will be stored.

◆ setShowOutgoingRays() [1/2]

void GOAT::raytracing::Raytrace_Path::setShowOutgoingRays ( bool show)

if true, Rays, which going out of an object without hidding a second one will be stored

◆ setShowOutgoingRays() [2/2]

void GOAT::raytracing::Raytrace_Path::setShowOutgoingRays ( bool show)

if true, Rays, which going out of an object without hidding a second one will be stored

◆ storeStep() [1/2]

void GOAT::raytracing::Raytrace_Path::storeStep ( )
private

◆ storeStep() [2/2]

void GOAT::raytracing::Raytrace_Path::storeStep ( )
private

◆ trace() [1/4]

void GOAT::raytracing::Raytrace_Path::trace ( )

If no Filename is given, the starting and endpoint of each ray step is stored in two arrays named P1 and P2.

◆ trace() [2/4]

void GOAT::raytracing::Raytrace_Path::trace ( )

If no Filename is given, the starting and endpoint of each ray step is stored in two arrays named P1 and P2.

◆ trace() [3/4]

void GOAT::raytracing::Raytrace_Path::trace ( std::string FName)

Starting point of the raytracing with the filename where the data will be stored.

◆ trace() [4/4]

void GOAT::raytracing::Raytrace_Path::trace ( std::string FName)

Starting point of the raytracing with the filename where the data will be stored.

◆ traceEnterObject() [1/2]

void GOAT::raytracing::Raytrace_Path::traceEnterObject ( )
privatevirtual

this function is called when the ray enters an object

Implements GOAT::raytracing::Raytrace.

◆ traceEnterObject() [2/2]

void GOAT::raytracing::Raytrace_Path::traceEnterObject ( )
privatevirtual

this function is called when the ray enters an object

Implements GOAT::raytracing::Raytrace.

◆ traceLeaveObject() [1/2]

void GOAT::raytracing::Raytrace_Path::traceLeaveObject ( )
privatevirtual

this function is called when the ray leaves an object

Implements GOAT::raytracing::Raytrace.

◆ traceLeaveObject() [2/2]

void GOAT::raytracing::Raytrace_Path::traceLeaveObject ( )
privatevirtual

this function is called when the ray leaves an object

Implements GOAT::raytracing::Raytrace.

◆ traceStopObject() [1/2]

void GOAT::raytracing::Raytrace_Path::traceStopObject ( )
privatevirtual

Reimplemented from GOAT::raytracing::Raytrace.

◆ traceStopObject() [2/2]

void GOAT::raytracing::Raytrace_Path::traceStopObject ( )
privatevirtual

Reimplemented from GOAT::raytracing::Raytrace.

Member Data Documentation

◆ numRays

int GOAT::raytracing::Raytrace_Path::numRays =0

Number of rays stored.

Definition at line 168 of file raytrace.h.

◆ os

std::ofstream GOAT::raytracing::Raytrace_Path::os
private

Definition at line 174 of file raytrace.h.

◆ P1

std::vector< maths::Vector< double > > GOAT::raytracing::Raytrace_Path::P1

Here, the starting points of each step are stored if no filename is given.

Definition at line 166 of file raytrace.h.

◆ P2

std::vector< maths::Vector< double > > GOAT::raytracing::Raytrace_Path::P2

Here, the ending points of each step are stored if no filename is given.

Definition at line 167 of file raytrace.h.

◆ showOutgoingRays

bool GOAT::raytracing::Raytrace_Path::showOutgoingRays = true
private

Definition at line 175 of file raytrace.h.

◆ storeInFile

bool GOAT::raytracing::Raytrace_Path::storeInFile = false
private

Definition at line 176 of file raytrace.h.


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