Panda3D
 All Classes Functions Variables Enumerations
config_physics.cxx
1 // Filename: config_physics.cxx
2 // Created by: charles (17Jul00)
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_physics.h"
16 #include "physicsCollisionHandler.h"
17 #include "physicsObject.h"
18 #include "physicalNode.h"
19 #include "linearIntegrator.h"
20 #include "linearControlForce.h"
21 #include "angularIntegrator.h"
22 #include "forceNode.h"
23 #include "forces.h"
24 #include "actorNode.h"
25 #include "angularForce.h"
26 #include "angularVectorForce.h"
27 
28 #include "dconfig.h"
29 
30 ConfigureDef(config_physics);
31 NotifyCategoryDef(physics, "");
32 
33 ConfigureFn(config_physics) {
34  init_libphysics();
35 }
36 
37 
38 ////////////////////////////////////////////////////////////////////
39 // Function: init_libphysics
40 // Description: Initializes the library. This must be called at
41 // least once before any of the functions or classes in
42 // this library can be used. Normally it will be
43 // called by the static initializers and need not be
44 // called explicitly, but special cases exist.
45 ////////////////////////////////////////////////////////////////////
46 void
47 init_libphysics() {
48  static bool initialized = false;
49  if (initialized) {
50  return;
51  }
52  initialized = true;
53 
54  ActorNode::init_type();
55  AngularForce::init_type();
56  AngularVectorForce::init_type();
57  BaseForce::init_type();
58  ForceNode::init_type();
59  LinearControlForce::init_type();
60  LinearCylinderVortexForce::init_type();
61  LinearDistanceForce::init_type();
62  LinearForce::init_type();
63  LinearFrictionForce::init_type();
64  LinearJitterForce::init_type();
65  LinearNoiseForce::init_type();
66  LinearRandomForce::init_type();
67  LinearSinkForce::init_type();
68  LinearSourceForce::init_type();
69  LinearUserDefinedForce::init_type();
70  LinearVectorForce::init_type();
71  Physical::init_type();
72  PhysicsCollisionHandler::init_type();
73  PhysicalNode::init_type();
74  PhysicsObject::init_type();
75 }