1 |
#include "types/ShapeType.hpp" |
2 |
|
3 |
using namespace oopse; |
4 |
|
5 |
ShapeType::ShapeType(void) { |
6 |
mass = 0.0; |
7 |
} |
8 |
|
9 |
ShapeType::~ShapeType(void) { |
10 |
} |
11 |
|
12 |
double ShapeType::getContactValueAt(double costheta, double phi) { |
13 |
|
14 |
vector<RealSphericalHarmonic*>::iterator contactIter; |
15 |
double contactVal; |
16 |
|
17 |
contactVal = 0.0; |
18 |
|
19 |
for(contactIter = contactFuncs.begin(); contactIter != contactFuncs.end(); |
20 |
++contactIter) |
21 |
contactVal += (*contactIter)->getValueAt(costheta, phi); |
22 |
|
23 |
return contactVal; |
24 |
} |
25 |
|
26 |
double ShapeType::getRangeValueAt(double costheta, double phi) { |
27 |
|
28 |
vector<RealSphericalHarmonic*>::iterator rangeIter; |
29 |
double rangeVal; |
30 |
|
31 |
rangeVal = 0.0; |
32 |
|
33 |
for(rangeIter = rangeFuncs.begin(); rangeIter != rangeFuncs.end(); |
34 |
++rangeIter) |
35 |
rangeVal += (*rangeIter)->getValueAt(costheta, phi); |
36 |
|
37 |
return rangeVal; |
38 |
} |
39 |
|
40 |
double ShapeType::getStrengthValueAt(double costheta, double phi) { |
41 |
|
42 |
vector<RealSphericalHarmonic*>::iterator strengthIter; |
43 |
double strengthVal; |
44 |
|
45 |
strengthVal = 0.0; |
46 |
|
47 |
for(strengthIter = strengthFuncs.begin(); |
48 |
strengthIter != strengthFuncs.end(); |
49 |
++strengthIter) |
50 |
strengthVal += (*strengthIter)->getValueAt(costheta, phi); |
51 |
|
52 |
return strengthVal; |
53 |
} |