15 #include "config_bullet.h"
17 #include "bulletBaseCharacterControllerNode.h"
18 #include "bulletBodyNode.h"
19 #include "bulletBoxShape.h"
20 #include "bulletCapsuleShape.h"
21 #include "bulletCharacterControllerNode.h"
22 #include "bulletConeShape.h"
23 #include "bulletConeTwistConstraint.h"
24 #include "bulletContactCallbackData.h"
25 #include "bulletConstraint.h"
26 #include "bulletConvexHullShape.h"
27 #include "bulletConvexPointCloudShape.h"
28 #include "bulletCylinderShape.h"
29 #include "bulletMinkowskiSumShape.h"
30 #include "bulletDebugNode.h"
31 #include "bulletFilterCallbackData.h"
32 #include "bulletGenericConstraint.h"
33 #include "bulletGhostNode.h"
34 #include "bulletHeightfieldShape.h"
35 #include "bulletHingeConstraint.h"
36 #include "bulletMultiSphereShape.h"
37 #include "bulletPlaneShape.h"
38 #include "bulletRigidBodyNode.h"
39 #include "bulletShape.h"
40 #include "bulletSliderConstraint.h"
41 #include "bulletSphereShape.h"
42 #include "bulletSphericalConstraint.h"
43 #include "bulletSoftBodyNode.h"
44 #include "bulletSoftBodyShape.h"
45 #include "bulletTickCallbackData.h"
46 #include "bulletTriangleMesh.h"
47 #include "bulletTriangleMeshShape.h"
48 #include "bulletVehicle.h"
49 #include "bulletWorld.h"
51 #include "bulletContactCallbacks.h"
53 extern ContactAddedCallback gContactAddedCallback;
54 extern ContactProcessedCallback gContactProcessedCallback;
55 extern ContactDestroyedCallback gContactDestroyedCallback;
58 #include "pandaSystem.h"
60 Configure(config_bullet);
61 NotifyCategoryDef(bullet,
"");
63 ConfigureFn(config_bullet) {
68 (
"bullet-max-objects", 1024,
69 PRC_DESC(
"Specifies the maximum number of individual objects within a "
70 "bullet physics world. Default value is 1024."));
73 (
"bullet-gc-lifetime", 256,
74 PRC_DESC(
"Specifies the lifetime of data clean up be the soft body world "
75 "info garbage collector. Default value is 256."));
78 (
"bullet-broadphase-algorithm", BulletWorld::BA_dynamic_aabb_tree,
79 PRC_DESC(
"Specifies the broadphase algorithm to be used by the physics "
80 "engine. Default value is 'aabb' (dynamic aabb tree)."));
83 (
"bullet-filter-algorithm", BulletWorld::FA_mask,
84 PRC_DESC(
"Specifies the algorithm to be used by the physics engine for "
85 "collision filtering. Default value is 'mask'."));
88 (
"bullet-sap-extents", 1000.0,
89 PRC_DESC(
"Specifies the world extent in all directions. The config variable "
90 "is only used if bullet-broadphase-algorithm is set to 'sap' "
91 "(sweep and prune). Default value is 1000.0."));
94 (
"bullet-enable-contact-events",
false,
95 PRC_DESC(
"Specifies if events should be send when new contacts are "
96 "created or existing contacts get remove. Warning: enabling "
97 "contact events might create more load on the event queue "
98 "then you might want! Default value is FALSE."));
101 (
"bullet-solver-iterations", 10,
102 PRC_DESC(
"Specifies the number of iterations for the Bullet contact "
103 "solver. This is the native Bullet property "
104 "btContactSolverInfo::m_numIterations. Default value is 10."));
107 (
"bullet-additional-damping",
false,
108 PRC_DESC(
"Enables additional damping on eachrigid body, in order to reduce "
109 "jitter. Default value is FALSE. Additional damping is an "
110 "experimental feature of the Bullet physics engine. Use with "
114 (
"bullet-additional-damping-linear-factor", 0.005,
115 PRC_DESC(
"Only used when bullet-additional-damping is set to TRUE. "
116 "Default value is 0.005"));
119 (
"bullet-additional-damping-angular-factor", 0.01,
120 PRC_DESC(
"Only used when bullet-additional-damping is set to TRUE. "
121 "Default value is 0.01"));
124 (
"bullet-additional-damping-linear-threshold", 0.01,
125 PRC_DESC(
"Only used when bullet-additional-damping is set to TRUE. "
126 "Default value is 0.01"));
129 (
"bullet-additional-damping-angular-threshold", 0.01,
130 PRC_DESC(
"Only used when bullet-additional-damping is set to TRUE. "
131 "Default value is 0.01."));
144 static bool initialized =
false;
151 BulletBaseCharacterControllerNode::init_type();
152 BulletBodyNode::init_type();
153 BulletBoxShape::init_type();
154 BulletCapsuleShape::init_type();
155 BulletCharacterControllerNode::init_type();
156 BulletConeShape::init_type();
157 BulletConeTwistConstraint::init_type();
158 BulletContactCallbackData::init_type();
159 BulletConstraint::init_type();
160 BulletConvexHullShape::init_type();
161 BulletConvexPointCloudShape::init_type();
162 BulletCylinderShape::init_type();
163 BulletMinkowskiSumShape::init_type();
164 BulletDebugNode::init_type();
165 BulletFilterCallbackData::init_type();
166 BulletGenericConstraint::init_type();
167 BulletGhostNode::init_type();
168 BulletHeightfieldShape::init_type();
169 BulletHingeConstraint::init_type();
170 BulletMultiSphereShape::init_type();
171 BulletPlaneShape::init_type();
172 BulletRigidBodyNode::init_type();
173 BulletShape::init_type();
174 BulletSliderConstraint::init_type();
175 BulletSphereShape::init_type();
176 BulletSphericalConstraint::init_type();
177 BulletSoftBodyNode::init_type();
178 BulletSoftBodyShape::init_type();
179 BulletTickCallbackData::init_type();
180 BulletTriangleMesh::init_type();
181 BulletTriangleMeshShape::init_type();
182 BulletVehicle::init_type();
183 BulletWorld::init_type();
186 gContactAddedCallback = contact_added_callback;
187 gContactProcessedCallback = contact_processed_callback;
188 gContactDestroyedCallback = contact_destroyed_callback;
192 bullet_cat.debug() <<
"initialize module" << endl;
static PandaSystem * get_global_ptr()
Returns the global PandaSystem object.
This class is used as a namespace to group several global properties of Panda.
This is a convenience class to specialize ConfigVariable as a boolean type.
void add_system(const string &system)
Intended for use by each subsystem to register itself at startup.
This is a convenience class to specialize ConfigVariable as a floating-point type.
This class specializes ConfigVariable as an enumerated type.
This is a convenience class to specialize ConfigVariable as an integer type.