/RTFunctions.h
Go to the documentation of this file.
1 #ifndef _RTFunctions_
2 #define _RTFunctions_
3 
4 namespace utl {
5  class Point;
6  class RandomEngine;
7 }
8 
9 #include <utl/Photon.h>
10 #include <utl/Vector.h>
11 #include <utl/TabulatedFunction.h>
12 
13 #include <vector>
14 #include <utility>
15 
16 namespace TelescopeSimulatorKG2 {
17 
18  namespace RTFunctions {
19 
20  void Reflection (const utl::Photon& photonIn,
21  const utl::Vector& normal,
22  utl::Photon& photonOut);
23 
24  void Absorption(const utl::Photon& photonIn,
25  const double filterAbsorptionFactor,
26  utl::Photon& photonOut);
27 
28  void Absorption(const utl::Photon& photonIn,
29  const double mirrorAbsorptionFactorTop,
30  const double mirrorAbsorptionFactorBot,
31  const double verticalPosOnMirror,
32  utl::Photon& photonOut,
33  const double mirrorSize);
34 
35  typedef std::vector<utl::Photon> PhotonList;
36  int Refraction(const double n12,
37  const utl::Photon& photonIn,
38  const utl::Vector& normal,
39  PhotonList& photonsOut);
40 
41  double Plane (const utl::Point& point,
42  const utl::Vector& normal,
43  const utl::Photon& photonIn,
44  utl::Photon& photonOut);
45 
46  typedef std::pair<utl::Photon, utl::Vector> PhotonNormalPair;
47  typedef std::vector<PhotonNormalPair> IntersectionList;
48  bool Sphere (const utl::Point& origin,
49  const double radius,
50  const utl::Photon& photonIn,
51  IntersectionList& intersections);
52 
53  utl::Vector TorusNormal(const utl::Point& origin,
54  const utl::Vector& inwards,
55  const utl::Point& point,
56  const double torusRadius,
57  const double tubeRadius);
58 
59  void Cubic(const double a0,
60  const double a1,
61  const double a2,
62  const double a3,
63  std::vector<double>& roots);
64 
65  void Quartic(const double a0,
66  const double a1,
67  const double a2,
68  const double a3,
69  const double a4,
70  std::vector<double>& roots);
71 
72  void Torus (const utl::Point& origin,
73  const utl::Vector& inwards,
74  const double torusRadius,
75  const double tubeRadius,
76  const utl::Photon& photonIn,
77  IntersectionList& intersections);
78 
79  int CurvedLensSurface (const utl::Point& origin,
80  const utl::Vector& inwards,
81  const double torusRadius,
82  const double tubeRadius,
83  const utl::Photon& photonIn,
84  const utl::Photon& photonLens);
85 
87  const utl::Vector& normalIn,
88  const double sigma_alpha);
89 
91  const utl::Vector& normalIn,
92  const double sigma_alpha,
93  const utl::Vector& rayIn);
94 
96  const utl::Vector& rayIn,
97  const utl::Vector& normal,
98  const double amountOfStrayLight,
99  const double MaxTheta);
100 
102  const utl::Vector& rayIn,
103  const utl::TabulatedFunction* mirrorDiffusionTop,
104  const utl::TabulatedFunction* mirrorDiffusionBot,
105  const double verticalPosOnMirror);
106  }
107 
108 }
109 
110 #endif
std::vector< PhotonNormalPair > IntersectionList
Definition: /RTFunctions.h:47
Point object.
Definition: Point.h:32
void Reflection(const utl::Photon &photonIn, const Vector &normal, utl::Photon &photonOut)
Definition: /RTFunctions.cc:33
Class to hold collection (x,y) points and provide interpolation between them.
void Cubic(const double a0, const double a1, const double a2, const double a3, vector< double > &roots)
void Absorption(const utl::Photon &photonIn, const double filterAbsorptionFactor, utl::Photon &photonOut)
Definition: /RTFunctions.cc:49
int Refraction(const double n12, const utl::Photon &photonIn, const Vector &normal, PhotonList &photonsOut)
std::pair< utl::Photon, utl::Vector > PhotonNormalPair
Definition: /RTFunctions.h:46
Vector TorusNormal(const utl::Point &origin, const utl::Vector &inwards, const utl::Point &point, const double torusRadius, const double tubeRadius)
Wraps the random number engine used to generate distributions.
Definition: RandomEngine.h:27
Vector MirrorDiffusion(utl::RandomEngine &rndm, const Vector &specularDir, const utl::TabulatedFunction *mirrorDiffusionTop, const utl::TabulatedFunction *mirrorDiffusionBot, const double verticalPosOnMirror)
void Quartic(const double a0, const double a1, const double a2, const double a3, const double a4, vector< double > &roots)
int CurvedLensSurface(const utl::Point &origin, const utl::Vector &inwards, const double torusRadius, const double tubeRadius, const utl::Photon &photonIn, const utl::Photon &photonLens)
Vector RandomNormal(utl::RandomEngine &rndm, const Vector &normalIn, const double sigma_alpha)
double Plane(const utl::Point &point, const utl::Vector &normal, const utl::Photon &photonIn, utl::Photon &photonOut)
Definition: /RTFunctions.cc:81
Vector LambertDiffusion(utl::RandomEngine &rndm, const Vector &rayIn, const Vector &normal, const double amountOfStrayLight, const double MaxTheta)
Vector object.
Definition: Vector.h:30
bool Sphere(const Point &origin, const double radius, const utl::Photon &photonIn, IntersectionList &intersection)
std::vector< utl::Photon > PhotonList
Definition: /RTFunctions.h:35
Vector RandomFacet(utl::RandomEngine &rndm, const Vector &normalIn, const double sigma_alpha, const Vector &rayIn)
void Torus(const utl::Point &origin, const utl::Vector &inwards, const double torusRadius, const double tubeRadius, const utl::Photon &photonIn, IntersectionList &intersections)

, generated on Tue Sep 26 2023.