00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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;
00037 std::list< Pointer<Geometry> >::iterator objects_iterator;
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