#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 |
Ray-trace class.
Contains methods for performing ray-traces between arbitrarily oriented and curved surfaces.
| RayTracer< T, U, V >::RayTracer | ( | int | numThreads, |
| int | nTot, | ||
| V | epsilon, | ||
| bool | verbose = false |
||
| ) |
Constructor.
Set internal parameters for ray-tracing.
| numThreads | Number of computing threads to employ. |
| nTot | Total amount of rays in beam. |
| epsilon | Precision of NR method, double/float. |
| verbose | Whether or not to print internal state information upon construction. |
| void RayTracer< T, U, V >::parallelRays | ( | T | ctp, |
| U * | fr_in, | ||
| U * | fr_out, | ||
| V | t0 | ||
| ) |
Run ray-trace in parallel.
Run a parallel ray-trace, depending on the type of target surface.
| ctp | reflparams or reflparamsf object containing target surface parameters. |
| fr_in | Pointer to input cframe or cframef object. |
| fr_out | Pointer to output cframe or cframef object. |
| t0 | Starting guess for NR method, double/float. |
| void RayTracer< T, U, V >::propagateRaysToTarget | ( | int | start, |
| int | stop, | ||
| T | ctp, | ||
| U * | fr_in, | ||
| U * | fr_out, | ||
| V | t0, | ||
| std::vector< V > | errors | ||
| ) |
Propagate rays to target.
Propagate a frame of rays to a target surface.
| start | Index of first loop iteration in parallel block. |
| stop | Index of last loop iteration in parallel block. |
| ctp | reflparams or reflparamsf object containing target surface parameters. |
| fr_in | Pointer to input cframe or cframef object. |
| fr_out | Pointer to output cframe or cframef object. |
| t0 | Starting guess for NR method, double/float. |
| errors | Vector containing surface errors, if any. |
| void RayTracer< T, U, V >::transfRays | ( | T | ctp, |
| U * | fr, | ||
| bool | inv = false |
||
| ) |
Transform to surface.
Transform ray-trace frame into target surface restframe, using target surface transformation matrix.
| ctp | reflparams or reflparamsf of target surface. |
| fr | Pointer to cframe or cframef object to be transformed. |
| inv | Whether or not to apply the inverse of the transformation matrix. |
| std::vector<std::thread> RayTracer< T, U, V >::threadPool |
Vector of thread object.