forked from jacobwjs/MC-Boost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcylinderAbsorber.h
44 lines (33 loc) · 1.14 KB
/
cylinderAbsorber.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// CylinderAbsorber.h
// Xcode
//
// Created by jacob on 6/20/11.
//
#ifndef CYLINDERABSORBER_H
#define CYLINDERABSORBER_H
#include <cmath>
class Absorber;
class CylinderAbsorber : public Absorber
{
public:
CylinderAbsorber(const double radius, const double x, const double y, const double z);
CylinderAbsorber(const double radius, const boost::shared_ptr<Vector3d> top,
const boost::shared_ptr<Vector3d>bottom);
~CylinderAbsorber();
virtual bool hitAbsorberBoundary(const boost::shared_ptr<Vector3d> photonVector);
virtual bool inAbsorber(const boost::shared_ptr<Vector3d> photonVector);
virtual bool crossedAbsorber(const boost::shared_ptr<Vector3d> photonVector);
void cartesianToCylindrical(void);
private:
// The height and radius of the cylindrical absorber.
double length;
double radius;
// Cartesian coordinates of the center location of one end
// of the cyclinder.
Vector3d topCenter;
// Cartesian coordinates of center location of the other end
// of the cyclinder.
Vector3d bottomCenter;
};
#endif