vee_collector.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 /* COPYRIGHT
00004  *
00005  * This file is part of the Visual Effects Engine - VEE
00006  *
00007  * Read the "VEE-LICENSE" file for the license.
00008  *
00009  * Authors & Copyright:   
00010  *
00011  * Tommi Ilmonen, Tuukka Heikura, Marko Myllymaa and 
00012  * Janne Kontkanen 2001-2004
00013  *
00014  * Additional copyrights: Tekes 2003-2004
00015  *
00016  * firstname.lastname@hut.fi
00017  *
00018  */
00019 
00020 #ifndef VEE_COLLECTOR_H
00021 #define VEE_COLLECTOR_H
00022 
00023 #include <vee_object.h>
00024 
00025 #include <list>
00026 #include <vector>
00027 
00028 class VEE_ForceObject;
00029 
00030 class VEE_Collector
00031 {
00032 public:
00033   typedef std::vector<VEE_ParticleVisualInfo>::iterator iterator;
00034   typedef std::list<VEE_ForceObject *>::iterator forceIterator;
00035   
00036   VEE_Collector();
00037   ~VEE_Collector();
00038   
00039  
00041   iterator begin() { return m_objects.begin();}
00042   uint collectedObjects() const { return m_collectedObjects; }
00043 
00045   forceIterator forceBegin() { return m_forces.begin();}
00047   forceIterator forceEnd() { return m_forces.end(); }
00048   
00049   uint forceCount() { return m_forces.size(); }
00050 
00052   static VEE_ParticleVisualInfo & getObject(iterator & it)
00053   { return (*it); }
00054 
00056   static VEE_ForceObject * getForce(forceIterator & it)
00057   { return (*it); }
00058  
00059   void addScene(VEE_SceneBox *);
00060   void clear();
00061   void reserve(uint n) { if(n > m_objects.size()) m_objects.resize(n); }
00062 
00063 protected:
00064   std::vector<VEE_ParticleVisualInfo> m_objects;
00065   std::list<VEE_ForceObject *>        m_forces;
00066   
00067   uint                                m_collectedObjects;
00068 
00069 };
00070 
00071 #endif

Generated on Mon Mar 12 21:09:00 2007 for VEE - The Visual Effects Engine by  doxygen 1.4.6