Panda3D
config_ode.cxx
1 // Filename: config_ode.cxx
2 // Created by: joswilso (27Dec06)
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_ode.h"
16 #include "odeWorld.h"
17 #include "odeMass.h"
18 #include "odeBody.h"
19 #include "odeJointGroup.h"
20 #include "odeJoint.h"
21 #include "odeSpace.h"
22 #include "odeGeom.h"
23 #include "odeSurfaceParameters.h"
24 #include "odeContactGeom.h"
25 #include "odeContact.h"
26 #include "odeAMotorJoint.h"
27 #include "odeBallJoint.h"
28 #include "odeContactJoint.h"
29 #include "odeFixedJoint.h"
30 #include "odeHingeJoint.h"
31 #include "odeHinge2Joint.h"
32 #include "odeLMotorJoint.h"
33 #include "odeNullJoint.h"
34 #include "odePlane2dJoint.h"
35 #include "odeSliderJoint.h"
36 #include "odeUniversalJoint.h"
37 #include "odeSimpleSpace.h"
38 #include "odeHashSpace.h"
39 #include "odeQuadTreeSpace.h"
40 #include "odeSphereGeom.h"
41 #include "odeBoxGeom.h"
42 #include "odePlaneGeom.h"
43 #include "odeCappedCylinderGeom.h"
44 #include "odeCylinderGeom.h"
45 #include "odeRayGeom.h"
46 #include "odeTriMeshData.h"
47 #include "odeTriMeshGeom.h"
48 #include "odeCollisionEntry.h"
49 #include "dconfig.h"
50 
51 Configure(config_ode);
52 NotifyCategoryDef(ode, "");
53 NotifyCategoryDef(odeworld, "ode");
54 NotifyCategoryDef(odebody, "ode");
55 NotifyCategoryDef(odejoint, "ode");
56 NotifyCategoryDef(odespace, "ode");
57 NotifyCategoryDef(odegeom, "ode");
58 NotifyCategoryDef(odetrimeshdata, "ode");
59 
60 ConfigureFn(config_ode) {
61  init_libode();
62 }
63 
64 ////////////////////////////////////////////////////////////////////
65 // Function: init_libode
66 // Description: Initializes the library. This must be called at
67 // least once before any of the functions or classes in
68 // this library can be used. Normally it will be
69 // called by the static initializers and need not be
70 // called explicitly, but special cases exist.
71 ////////////////////////////////////////////////////////////////////
72 void
73 init_libode() {
74  static bool initialized = false;
75  if (initialized) {
76  return;
77  }
78  initialized = true;
79 
80  dInitODE();
81 
82  OdeWorld::init_type();
83  OdeMass::init_type();
84  OdeBody::init_type();
85  OdeJointGroup::init_type();
86  OdeJoint::init_type();
87  OdeSpace::init_type();
88  OdeGeom::init_type();
89  OdeSurfaceParameters::init_type();
90  OdeContactGeom::init_type();
91  OdeContact::init_type();
92  OdeAMotorJoint::init_type();
93  OdeBallJoint::init_type();
94  OdeContactJoint::init_type();
95  OdeFixedJoint::init_type();
96  OdeHingeJoint::init_type();
97  OdeHinge2Joint::init_type();
98  OdeLMotorJoint::init_type();
99  OdeNullJoint::init_type();
100  OdePlane2dJoint::init_type();
101  OdeSliderJoint::init_type();
102  OdeUniversalJoint::init_type();
103  OdeSimpleSpace::init_type();
104  OdeHashSpace::init_type();
105  OdeQuadTreeSpace::init_type();
106  OdeSphereGeom::init_type();
107  OdeBoxGeom::init_type();
108  OdePlaneGeom::init_type();
109  OdeCappedCylinderGeom::init_type();
110  OdeCylinderGeom::init_type();
111  OdeRayGeom::init_type();
112  OdeTriMeshData::init_type();
113  OdeTriMeshGeom::init_type();
114  OdeCollisionEntry::init_type();
115 }