MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //---------------------------------------------------------------------------------- 00004 00008 //---------------------------------------------------------------------------------- 00009 #ifndef __mlSphere_H 00010 #define __mlSphere_H 00011 00012 #ifndef __MLToolsSystem_H 00013 #include "MLToolsSystem.h" 00014 #endif 00015 #ifndef __mlLinearAlgebra_H 00016 #include "mlLinearAlgebra.h" 00017 #endif 00018 00019 ML_START_NAMESPACE 00020 00021 //----------------------------------------------------------------- 00024 //----------------------------------------------------------------- 00025 class MLTOOLS_EXPORT Sphere 00026 { 00027 public: 00029 inline Sphere() : center(Vector3(0,0,0)), radius(0) {} 00030 00033 inline Sphere(const Vector3 &c, double r) : center(c), radius(r) {} 00034 00036 inline double getRadius() const { return radius; } 00037 00039 inline const Vector3 &getCenter() const { return center; } 00040 00042 inline void setRadius(double r) { radius=r; } 00043 00045 inline void setCenter(const Vector3 &c) { center=c; } 00046 00047 private: 00049 Vector3 center; 00050 00052 double radius; 00053 }; 00054 00055 ML_END_NAMESPACE 00056 00057 #endif // __mlSphere_H 00058