Panda3D
particleSystemManager.I
1 // Filename: particleSystemManager.I
2 // Created by: charles (28Jun00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 ////////////////////////////////////////////////////////////////////
16 // Function : set_frame_stepping
17 // Access : public
18 ////////////////////////////////////////////////////////////////////
19 
20 INLINE void ParticleSystemManager::
21 set_frame_stepping(int every_nth_frame) {
22  _nth_frame = every_nth_frame;
23 }
24 
25 ////////////////////////////////////////////////////////////////////
26 // Function : get_frame_stepping
27 // Access : public
28 ////////////////////////////////////////////////////////////////////
29 
30 INLINE int ParticleSystemManager::
31 get_frame_stepping() const {
32  return _nth_frame;
33 }
34 
35 ////////////////////////////////////////////////////////////////////
36 // Function : attach_particlesystem
37 // Access : public
38 ////////////////////////////////////////////////////////////////////
39 
40 INLINE void ParticleSystemManager::
41 attach_particlesystem(ParticleSystem *ps) {
42  ps->_manager = this;
44  PT(ParticleSystem) ptps = ps;
45  found = find(_ps_list.begin(), _ps_list.end(), ptps);
46  if (found == _ps_list.end())
47  _ps_list.push_back(ps);
48 }
49 
50 ////////////////////////////////////////////////////////////////////
51 // Function : clear
52 // Access : public
53 ////////////////////////////////////////////////////////////////////
54 
55 INLINE void ParticleSystemManager::
56 clear() {
57  _ps_list.erase(_ps_list.begin(), _ps_list.end());
58 }
This is our own Panda specialization on the default STL list.
Definition: plist.h:38
Contains and manages a particle system.