Main Page | Class Hierarchy | Class List | File List | Class Members

sphere_space.h

00001 /***************************************************************************
00002                           sphere_space.h  -  description
00003                              -------------------
00004     begin                : Sun Feb 2 2003
00005     copyright            : (C) 2003 by Moritz Franosch
00006     email                : mail@Franosch.org
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
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; // all spheres
00040   std::list<Sphere>::iterator sphere_iterator; // iterator through spheres
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

Generated on Fri Apr 22 11:06:42 2005 for partsim.kdevelop by doxygen 1.3.6