particleSystemManager.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // Filename: particleSystemManager.h
  2. // Created by: charles (28Jun00)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://www.panda3d.org/license.txt .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. #ifndef PARTICLESYSTEMMANAGER_H
  19. #define PARTICLESYSTEMMANAGER_H
  20. #include <pandabase.h>
  21. #include "plist.h"
  22. #include "particleSystem.h"
  23. ////////////////////////////////////////////////////////////////////
  24. // Class : ParticleSystemManager
  25. // Description : Manages a set of individual ParticleSystem objects,
  26. // so that each individual one doesn't have to be
  27. // updated and rendered every frame
  28. ////////////////////////////////////////////////////////////////////
  29. class EXPCL_PANDAPHYSICS ParticleSystemManager {
  30. private:
  31. plist< PT(ParticleSystem) > _ps_list;
  32. int _nth_frame;
  33. int _cur_frame;
  34. PUBLISHED:
  35. ParticleSystemManager(int every_nth_frame = 1);
  36. INLINE void set_frame_stepping(int every_nth_frame);
  37. INLINE int get_frame_stepping(void) const;
  38. INLINE void attach_particlesystem(ParticleSystem *ps);
  39. void remove_particlesystem(ParticleSystem *ps);
  40. INLINE void clear(void);
  41. void do_particles(float dt);
  42. };
  43. #include "particleSystemManager.I"
  44. #endif // PARTICLESYSTEMMANAGER_H