Last change
on this file since e4a3302 was
d85c194,
checked in by Piotr Rozyczko <piotr.rozyczko@…>, 9 years ago
|
Remaining modules refactored
|
-
Property mode set to
100644
|
File size:
998 bytes
|
Rev | Line | |
---|
[aa639ea] | 1 | /** \file sphere.h class Sphere:GeoShape */ |
---|
| 2 | |
---|
| 3 | #ifndef SPHERE_H |
---|
| 4 | #define SPHERE_H |
---|
| 5 | |
---|
| 6 | #include "geo_shape.h" |
---|
| 7 | |
---|
| 8 | /** class Sphere, subclass of GeoShape */ |
---|
| 9 | class Sphere : public GeoShape { |
---|
| 10 | public: |
---|
| 11 | |
---|
| 12 | /** initialize */ |
---|
| 13 | Sphere(); |
---|
| 14 | |
---|
| 15 | /** constructor with radius initialization */ |
---|
| 16 | Sphere(double radius); |
---|
| 17 | |
---|
| 18 | ~Sphere(); |
---|
| 19 | |
---|
| 20 | /** set parameter radius */ |
---|
| 21 | void SetRadius(double r); |
---|
| 22 | |
---|
| 23 | /** get the radius */ |
---|
| 24 | double GetRadius(); |
---|
| 25 | |
---|
| 26 | /** Get the radius of the sphere to cover this shape */ |
---|
| 27 | double GetMaxRadius(); |
---|
| 28 | |
---|
| 29 | /** get the volume */ |
---|
| 30 | double GetVolume(); |
---|
| 31 | |
---|
| 32 | /** calculate the sphere form factor, no scale, no background*/ |
---|
| 33 | void GetFormFactor(IQ * iq); |
---|
| 34 | |
---|
| 35 | /** using a equation to check whether a point with XYZ lies |
---|
| 36 | within the sphere with center (0,0,0) |
---|
| 37 | */ |
---|
| 38 | Point3D GetAPoint(double sld); |
---|
| 39 | |
---|
| 40 | /** check whether a point is inside the sphere at any position |
---|
| 41 | in the 3D space |
---|
| 42 | */ |
---|
| 43 | bool IsInside(const Point3D& point) const; |
---|
| 44 | |
---|
| 45 | ShapeType GetShapeType() const; |
---|
| 46 | |
---|
| 47 | private: |
---|
| 48 | double r_; |
---|
| 49 | |
---|
| 50 | }; |
---|
| 51 | |
---|
| 52 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.