Panda3D
config_particlesystem.cxx
1 // Filename: config_particlesystem.cxx
2 // Created by: charles (05Jul00)
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 #include "config_particlesystem.h"
16 #include "particleSystem.h"
17 #include "geomParticleRenderer.h"
18 #include "geomNode.h"
19 
20 ConfigureDef(config_particlesystem);
21 NotifyCategoryDef(particlesystem, "");
22 
23 ConfigureFn(config_particlesystem) {
24  ColorInterpolationFunction::init_type();
25  ColorInterpolationFunctionConstant::init_type();
26  ColorInterpolationFunctionLinear::init_type();
27  ColorInterpolationFunctionStepwave::init_type();
28  ColorInterpolationFunctionSinusoid::init_type();
29  ParticleSystem::init_type();
30  GeomNode::GeomList::init_type(); // repeated here to ensure instantiated templates get initialized too.
31  init_libparticlesystem();
32 }
33 
34 ////////////////////////////////////////////////////////////////////
35 // Function: init_libparticlesystem
36 // Description: Initializes the library. This must be called at
37 // least once before any of the functions or classes in
38 // this library can be used. Normally it will be
39 // called by the static initializers and need not be
40 // called explicitly, but special cases exist.
41 ////////////////////////////////////////////////////////////////////
42 void
43 init_libparticlesystem() {
44  static bool initialized = false;
45  if (initialized) {
46  return;
47  }
48  initialized = true;
49 
50  ParticleSystem::init_type();
51 }
52