Panda3D
|
00001 // Filename: config_particlesystem.cxx 00002 // Created by: charles (05Jul00) 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 #include "config_particlesystem.h" 00016 #include "particleSystem.h" 00017 #include "geomParticleRenderer.h" 00018 #include "geomNode.h" 00019 00020 ConfigureDef(config_particlesystem); 00021 NotifyCategoryDef(particlesystem, ""); 00022 00023 ConfigureFn(config_particlesystem) { 00024 ColorInterpolationFunction::init_type(); 00025 ColorInterpolationFunctionConstant::init_type(); 00026 ColorInterpolationFunctionLinear::init_type(); 00027 ColorInterpolationFunctionStepwave::init_type(); 00028 ColorInterpolationFunctionSinusoid::init_type(); 00029 ParticleSystem::init_type(); 00030 GeomNode::GeomList::init_type(); // repeated here to ensure instantiated templates get initialized too. 00031 init_libparticlesystem(); 00032 } 00033 00034 //////////////////////////////////////////////////////////////////// 00035 // Function: init_libparticlesystem 00036 // Description: Initializes the library. This must be called at 00037 // least once before any of the functions or classes in 00038 // this library can be used. Normally it will be 00039 // called by the static initializers and need not be 00040 // called explicitly, but special cases exist. 00041 //////////////////////////////////////////////////////////////////// 00042 void 00043 init_libparticlesystem() { 00044 static bool initialized = false; 00045 if (initialized) { 00046 return; 00047 } 00048 initialized = true; 00049 00050 ParticleSystem::init_type(); 00051 } 00052