00001 // Filename: particleSystemManager.I 00002 // Created by: charles (28Jun00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 //////////////////////////////////////////////////////////////////// 00016 // Function : set_frame_stepping 00017 // Access : public 00018 //////////////////////////////////////////////////////////////////// 00019 00020 INLINE void ParticleSystemManager:: 00021 set_frame_stepping(int every_nth_frame) { 00022 _nth_frame = every_nth_frame; 00023 } 00024 00025 //////////////////////////////////////////////////////////////////// 00026 // Function : get_frame_stepping 00027 // Access : public 00028 //////////////////////////////////////////////////////////////////// 00029 00030 INLINE int ParticleSystemManager:: 00031 get_frame_stepping() const { 00032 return _nth_frame; 00033 } 00034 00035 //////////////////////////////////////////////////////////////////// 00036 // Function : attach_particlesystem 00037 // Access : public 00038 //////////////////////////////////////////////////////////////////// 00039 00040 INLINE void ParticleSystemManager:: 00041 attach_particlesystem(ParticleSystem *ps) { 00042 ps->_manager = this; 00043 plist< PT(ParticleSystem) >::iterator found; 00044 PT(ParticleSystem) ptps = ps; 00045 found = find(_ps_list.begin(), _ps_list.end(), ptps); 00046 if (found == _ps_list.end()) 00047 _ps_list.push_back(ps); 00048 } 00049 00050 //////////////////////////////////////////////////////////////////// 00051 // Function : clear 00052 // Access : public 00053 //////////////////////////////////////////////////////////////////// 00054 00055 INLINE void ParticleSystemManager:: 00056 clear() { 00057 _ps_list.erase(_ps_list.begin(), _ps_list.end()); 00058 }