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