SpherePackingScenarioGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SphereGeometry.h
Go to the documentation of this file.
00001 /*
00002  * SphereGeometry.h
00003  *
00004  *  Created on: 19.04.2011
00005  *      Author: Michael
00006  */
00007 
00008 #ifndef SphereGeometry_H_
00009 #define SphereGeometry_H_
00010 
00011 #include "tarch/la/Vector.h"
00012 
00013 namespace algorithms
00014 {
00015   namespace geometries
00016   {
00017     class SphereGeometry;
00018   }}
00024 class algorithms::geometries::SphereGeometry
00025 {
00026 public:
00030   SphereGeometry();
00035   SphereGeometry(tarch::la::Vector<3,double> position, double radius)
00036   :_positionX(position[0]),
00037    _positionY(position[1]),
00038    _positionZ(position[2]),
00039    _radius(radius)
00040   {}
00041 
00048   SphereGeometry(double positionX, double positionY, double positionZ);
00049 
00057   SphereGeometry(double positionX, double positionY, double positionZ,double radius);
00061   virtual
00062   ~SphereGeometry();
00066   double getPositionX() const;
00070   double getPositionY() const;
00074   double getPositionZ() const;
00075 
00076   double getRadius() const;
00077 
00082   void setPositionX(double value);
00087   void setPositionY(double value);
00092   void setPositionZ(double value);
00093 
00094   void setRadius(double value);
00095 
00096   double _positionX;
00097   double _positionY;
00098   double _positionZ;
00099   double _radius;
00100   bool operator<(const SphereGeometry &A)const
00101   {
00102     if(_radius<A.getRadius()) return true;
00103     if(_radius==A.getRadius()) return (_positionX<A.getPositionX());
00104     return false;
00105   }
00106   bool operator==(const SphereGeometry &A)const
00107               {
00108     if(_radius==A.getRadius()&&_positionX==A._positionX&&_positionY==A._positionY&&_positionZ==A._positionZ) return true;
00109     return false;
00110               }
00111 };
00112 
00113 #endif /* SphereGeometry_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines