PyPO User Manual
RayTracer< T, U, V > Class Template Reference

#include <RayTrace.h>

Public Member Functions

 RayTracer (int numThreads, int nTot, V epsilon, bool verbose=false)
 
void transfRays (T ctp, U *fr, bool inv=false)
 
void propagateRaysToTarget (int start, int stop, T ctp, U *fr_in, U *fr_out, V t0, std::vector< V > errors)
 
void parallelRays (T ctp, U *fr_in, U *fr_out, V t0)
 

Public Attributes

Utils< V > ut
 
std::vector< std::thread > threadPool
 

Detailed Description

template<class T, class U, class V>
class RayTracer< T, U, V >

Ray-trace class.

Contains methods for performing ray-traces between arbitrarily oriented and curved surfaces.

See also
Utils
RTRefls

Constructor & Destructor Documentation

◆ RayTracer()

template<class T , class U , class V >
RayTracer< T, U, V >::RayTracer ( int  numThreads,
int  nTot,
epsilon,
bool  verbose = false 
)

Constructor.

Set internal parameters for ray-tracing.

Parameters
numThreadsNumber of computing threads to employ.
nTotTotal amount of rays in beam.
epsilonPrecision of NR method, double/float.
verboseWhether or not to print internal state information upon construction.

Member Function Documentation

◆ parallelRays()

template<class T , class U , class V >
void RayTracer< T, U, V >::parallelRays ( ctp,
U *  fr_in,
U *  fr_out,
t0 
)

Run ray-trace in parallel.

Run a parallel ray-trace, depending on the type of target surface.

Parameters
ctpreflparams or reflparamsf object containing target surface parameters.
fr_inPointer to input cframe or cframef object.
fr_outPointer to output cframe or cframef object.
t0Starting guess for NR method, double/float.
See also
reflparams
reflparamsf
cframe
cframef

◆ propagateRaysToTarget()

template<class T , class U , class V >
void RayTracer< T, U, V >::propagateRaysToTarget ( int  start,
int  stop,
ctp,
U *  fr_in,
U *  fr_out,
t0,
std::vector< V >  errors 
)

Propagate rays to target.

Propagate a frame of rays to a target surface.

Parameters
startIndex of first loop iteration in parallel block.
stopIndex of last loop iteration in parallel block.
ctpreflparams or reflparamsf object containing target surface parameters.
fr_inPointer to input cframe or cframef object.
fr_outPointer to output cframe or cframef object.
t0Starting guess for NR method, double/float.
errorsVector containing surface errors, if any.
See also
reflparams
reflparamsf
cframe
cframef

◆ transfRays()

template<class T , class U , class V >
void RayTracer< T, U, V >::transfRays ( ctp,
U *  fr,
bool  inv = false 
)

Transform to surface.

Transform ray-trace frame into target surface restframe, using target surface transformation matrix.

Parameters
ctpreflparams or reflparamsf of target surface.
frPointer to cframe or cframef object to be transformed.
invWhether or not to apply the inverse of the transformation matrix.
See also
reflparams
reflparamsf
cframe
cframef

Member Data Documentation

◆ threadPool

template<class T , class U , class V >
std::vector<std::thread> RayTracer< T, U, V >::threadPool

Vector of thread object.

◆ ut

template<class T , class U , class V >
Utils<V> RayTracer< T, U, V >::ut

Utils object.


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