00001 // Filename: config_physics.cxx 00002 // Created by: charles (17Jul00) 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_physics.h" 00016 #include "physicsCollisionHandler.h" 00017 #include "physicsObject.h" 00018 #include "physicalNode.h" 00019 #include "linearIntegrator.h" 00020 #include "linearControlForce.h" 00021 #include "angularIntegrator.h" 00022 #include "forceNode.h" 00023 #include "forces.h" 00024 #include "actorNode.h" 00025 #include "angularForce.h" 00026 #include "angularVectorForce.h" 00027 00028 #include "dconfig.h" 00029 00030 ConfigureDef(config_physics); 00031 NotifyCategoryDef(physics, ""); 00032 00033 ConfigureFn(config_physics) { 00034 init_libphysics(); 00035 } 00036 00037 00038 //////////////////////////////////////////////////////////////////// 00039 // Function: init_libphysics 00040 // Description: Initializes the library. This must be called at 00041 // least once before any of the functions or classes in 00042 // this library can be used. Normally it will be 00043 // called by the static initializers and need not be 00044 // called explicitly, but special cases exist. 00045 //////////////////////////////////////////////////////////////////// 00046 void 00047 init_libphysics() { 00048 static bool initialized = false; 00049 if (initialized) { 00050 return; 00051 } 00052 initialized = true; 00053 00054 ActorNode::init_type(); 00055 AngularForce::init_type(); 00056 AngularVectorForce::init_type(); 00057 BaseForce::init_type(); 00058 ForceNode::init_type(); 00059 LinearControlForce::init_type(); 00060 LinearCylinderVortexForce::init_type(); 00061 LinearDistanceForce::init_type(); 00062 LinearForce::init_type(); 00063 LinearFrictionForce::init_type(); 00064 LinearJitterForce::init_type(); 00065 LinearNoiseForce::init_type(); 00066 LinearRandomForce::init_type(); 00067 LinearSinkForce::init_type(); 00068 LinearSourceForce::init_type(); 00069 LinearUserDefinedForce::init_type(); 00070 LinearVectorForce::init_type(); 00071 Physical::init_type(); 00072 PhysicsCollisionHandler::init_type(); 00073 PhysicalNode::init_type(); 00074 PhysicsObject::init_type(); 00075 }