Branch data Line data Source code
1 : : /**
2 : : * \file material_opt.cxx \brief Material_Properties Implementation
3 : : *
4 : : * This source files implements the different methods for the material optical properties class
5 : : */
6 : :
7 : : #include "read_mesh.h"
8 : :
9 : : // material_opt Class
10 : :
11 : : //! Default Constructor
12 : 0 : material_opt::material_opt()
13 : : {
14 : 0 : _parent_mesh = NULL;
15 : :
16 : 0 : _mu_a = 0.0;
17 : 0 : _mu_s = 0.0;
18 : 0 : _g = 0.0;
19 : 0 : _n = 0.0;
20 : :
21 : 0 : _id = -1;
22 : 0 : }
23 : :
24 : : //! Regular Constructor
25 : 8120 : material_opt::material_opt(int id, double mu_a, double mu_s, double g, double n, mesh* parent_mesh)
26 : : {
27 : 8120 : _parent_mesh = parent_mesh;
28 : :
29 : 8120 : _mu_a = mu_a;
30 : 8120 : _mu_s = mu_s;
31 : 8120 : _g = g;
32 : 8120 : _n = n;
33 : :
34 : 8120 : _id = id;
35 : 8120 : }
36 : :
37 : : //! Destructor
38 : 4340 : material_opt::~material_opt()
39 : : {
40 : 4340 : }
41 : :
42 : : // Getters
43 : :
44 : : //! This method returns the parent mesh
45 : 0 : mesh* material_opt::get_parent_mesh()
46 : : {
47 : 0 : return _parent_mesh;
48 : : }
49 : :
50 : : //! This method returns the absorption coefficient of the material
51 : 5046264 : double material_opt::get_mu_a()
52 : : {
53 : 5046264 : return _mu_a;
54 : : }
55 : :
56 : : //! This method returns the scattering coefficient of the material
57 : 5046264 : double material_opt::get_mu_s()
58 : : {
59 : 5046264 : return _mu_s;
60 : : }
61 : :
62 : : //! This method returns the anisotropy coefficient of the material
63 : 5046264 : double material_opt::get_g()
64 : : {
65 : 5046264 : return _g;
66 : : }
67 : :
68 : : //! This method returns the deflection angle of the material
69 : 560 : double material_opt::get_n()
70 : : {
71 : 560 : return _n;
72 : : }
73 : :
74 : : //! This method returns the id of the material
75 : 0 : int material_opt::get_id()
76 : : {
77 : 0 : return _id;
78 : : }
79 : :
80 : :
81 : : // Setters
82 : :
83 : : //!
84 : : //! This method sets the absorption coefficient of the material
85 : : //! @param mu_a [in]: absorption coefficient to be added
86 : : //!
87 : 0 : void material_opt::set_mu_a(double mu_a)
88 : : {
89 : 0 : _mu_a = mu_a;
90 : 0 : }
91 : :
92 : : //!
93 : : //! This method sets the scattering coefficient of the material
94 : : //! @param mu_s [in]: scattering coefficient to be added
95 : : //!
96 : 0 : void material_opt::set_mu_s(double mu_s)
97 : : {
98 : 0 : _mu_s = mu_s;
99 : 0 : }
100 : :
101 : : //!
102 : : //! This method sets the anisotropy coefficient of the material
103 : : //! @param g [in]: anisotropy coefficient to be added
104 : : //!
105 : 0 : void material_opt::set_g(double g)
106 : : {
107 : 0 : _g = g;
108 : 0 : }
109 : :
110 : : //!
111 : : //! This method sets the deflection of the material
112 : : //! @param n [in]: deflection to be added
113 : : //!
114 : 0 : void material_opt::set_n(double n)
115 : : {
116 : 0 : _n = n;
117 : 0 : }
118 : :
119 : : //!
120 : : //! This method sets the id of the material
121 : : //! @param id [in]: id to be added
122 : : //!
123 : 0 : void material_opt::set_id(int id)
124 : : {
125 : 0 : _id = id;
126 [ + - ][ + - ]: 112 : }
|