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

compound.h

00001 /***************************************************************************
00002                           compound.h  -  description
00003                              -------------------
00004     begin                : Sat Mar 1 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 COMPOUND_H
00019 #define COMPOUND_H
00020 
00021 #include <list>
00022 
00023 #include "askosdata/pointer.h"
00024 
00025 #include "geometry.h"
00026 
00027 
00032 class Compound : public Geometry {
00033 
00034 private:
00035 
00036   std::list< Pointer<Geometry> > objects; // all geometric objects in this compound
00037   std::list< Pointer<Geometry> >::iterator objects_iterator; // iterator through objects
00038 
00039 public: 
00040 
00043   Compound();
00044 
00047   void add(const Pointer<Geometry> g);
00048 
00052   virtual bool operator()(const Particle::vector_t& p) const;
00053 
00056   void add_voxel(const Particle::vector_t& p1,
00057                  const Particle::vector_t& p2);
00058 
00062   void add_pyramid(const Particle::vector_t& top,
00063                    const Particle::vector_t& c1,
00064                    const Particle::vector_t& c2,
00065                    const Particle::vector_t& c3,
00066                    const Particle::vector_t& c4);
00067 
00070   void reset();
00071 
00076   bool next();
00077 
00080   bool at_end() const;
00081   
00084   bool empty() const;
00085 
00086   int size() const;
00087 
00090   const Geometry& get_object() const;
00091 
00094   Geometry& get_object();
00095 
00098   virtual void to_xml(std::ostream& o);
00099 
00100 };
00101 
00102 
00103 #endif // COMPOUND_H

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