00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef SPHERE_SPACE_H
00019 #define SPHERE_SPACE_H
00020
00021 #include <ostream>
00022 #include <list>
00023
00024 #include "particle.h"
00025 #include "sphere.h"
00026
00027
00028 class SPH;
00029
00030
00035 class Sphere_Space {
00036
00037 private:
00038
00039 std::list<Sphere> spheres;
00040 std::list<Sphere>::iterator sphere_iterator;
00041
00044 bool is_inside_sphere(const Particle::vector_t& p);
00045
00048 Sphere& get_sphere();
00049
00050 public:
00051
00057 Sphere_Space(SPH& sph, const int nspheres);
00058
00061 void reset();
00062
00067 bool next();
00068
00071 bool at_end() const;
00072
00075 const Sphere& get_sphere() const;
00076
00079 void to_xml(std::ostream& o);
00080
00081 };
00082
00083
00086 std::ostream& operator<<(std::ostream& o, Sphere_Space& sphere_space);
00087
00088
00089 #endif // SPHERE_SPACE_H