00001
00002
00003 #ifndef SPHERE_H
00004 #define SPHERE_H
00005
00006 #include "coord.h"
00007
00009 class Sphere {
00010
00011 private:
00012 Coord center;
00013 double radius;
00014
00015 public:
00016
00018 Sphere():radius(DEFAULT_SPHERE_RADIUS) {}
00019
00024 Sphere(Coord center, double radius) {
00025 this->center = center;
00026 this->radius = radius;
00027 }
00028
00032 void setCenter(Coord center) {
00033 this->center = center;
00034 }
00035
00039 void setRadius(double radius) {
00040 this->radius = radius;
00041 }
00042
00047 void setParams(Coord center, double radius) {
00048 this->center = center;
00049 this->radius = radius;
00050 }
00051
00055 void getCenter(Coord& center) const {
00056 center = this->center;
00057 }
00058
00062 void getRadius(double& radius) const {
00063 radius = this->radius;
00064 }
00065
00070 void getParams(Coord& center, double& radius) const {
00071 center = this->center;
00072 radius = this->radius;
00073 }
00074
00075 };
00076
00077 #endif