magnetic_scattrelease-4.2.2ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249unittest-saveload
Last change
on this file since c7634fd was
d85c194,
checked in by Piotr Rozyczko <piotr.rozyczko@…>, 9 years ago
|
Remaining modules refactored
|
-
Property mode set to
100644
|
File size:
616 bytes
|
Rev | Line | |
---|
[aa639ea] | 1 | /** \file analytical_model.cc */ |
---|
| 2 | |
---|
| 3 | #include "sphere.h" |
---|
| 4 | #include "hollow_sphere.h" |
---|
| 5 | #include "analytical_model.h" |
---|
| 6 | |
---|
| 7 | AnalyticalModel::AnalyticalModel(const GeoShape &geo_shape) |
---|
| 8 | { |
---|
| 9 | switch (geo_shape.GetShapeType()){ |
---|
| 10 | case SPHERE: |
---|
| 11 | shape_ = new Sphere(static_cast<const Sphere&>(geo_shape)); |
---|
| 12 | break; |
---|
| 13 | case HOLLOWSPHERE: |
---|
| 14 | shape_ = new HollowSphere(static_cast<const HollowSphere&>(geo_shape)); |
---|
| 15 | break; |
---|
| 16 | case CYLINDER: |
---|
| 17 | break; |
---|
| 18 | } |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | AnalyticalModel::~AnalyticalModel() |
---|
| 22 | { |
---|
| 23 | if (shape_ != NULL) delete shape_; |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | void AnalyticalModel::CalculateIQ(IQ * iq) |
---|
| 27 | { |
---|
| 28 | shape_->GetFormFactor(iq); |
---|
| 29 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.