diff --git a/panda/src/bullet/bulletWorld.I b/panda/src/bullet/bulletWorld.I index 5a85cab4b6..168aad2f13 100644 --- a/panda/src/bullet/bulletWorld.I +++ b/panda/src/bullet/bulletWorld.I @@ -54,6 +54,43 @@ INLINE BulletWorld:: delete _broadphase; } +//////////////////////////////////////////////////////////////////// +// Function: BulletWorld::set_debug_node +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void BulletWorld:: +set_debug_node(BulletDebugNode *node) { + + nassertv(node); + + _debug = node; + _world->setDebugDrawer(&(_debug->_drawer)); +} + +//////////////////////////////////////////////////////////////////// +// Function: BulletWorld::clear_debug_node +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void BulletWorld:: +clear_debug_node() { + + _debug = NULL; + _world->setDebugDrawer(NULL); +} + +//////////////////////////////////////////////////////////////////// +// Function: BulletWorld::get_debug_node +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE BulletDebugNode *BulletWorld:: +get_debug_node() const { + + return _debug; +} + //////////////////////////////////////////////////////////////////// // Function: BulletWorld::get_world // Access: Public diff --git a/panda/src/bullet/bulletWorld.cxx b/panda/src/bullet/bulletWorld.cxx index 86ee7f6359..d51ebda323 100644 --- a/panda/src/bullet/bulletWorld.cxx +++ b/panda/src/bullet/bulletWorld.cxx @@ -258,32 +258,6 @@ sync_b2p() { } } -//////////////////////////////////////////////////////////////////// -// Function: BulletWorld::set_debug_node -// Access: Published -// Description: -//////////////////////////////////////////////////////////////////// -void BulletWorld:: -set_debug_node(BulletDebugNode *node) { - - nassertv(node); - - _debug = node; - _world->setDebugDrawer(&(_debug->_drawer)); -} - -//////////////////////////////////////////////////////////////////// -// Function: BulletWorld::clear_debug_node -// Access: Published -// Description: -//////////////////////////////////////////////////////////////////// -void BulletWorld:: -clear_debug_node() { - - _debug = NULL; - _world->setDebugDrawer(NULL); -} - //////////////////////////////////////////////////////////////////// // Function: BulletWorld::attach // Access: Published diff --git a/panda/src/bullet/bulletWorld.h b/panda/src/bullet/bulletWorld.h index 286a59e6f3..d670a5786f 100644 --- a/panda/src/bullet/bulletWorld.h +++ b/panda/src/bullet/bulletWorld.h @@ -61,11 +61,13 @@ PUBLISHED: int do_physics(PN_stdfloat dt, int max_substeps=1, PN_stdfloat stepsize=1.0f/60.0f); - void set_debug_node(BulletDebugNode *node); - void clear_debug_node(); - BulletSoftBodyWorldInfo get_world_info(); + // Debug + INLINE void set_debug_node(BulletDebugNode *node); + INLINE void clear_debug_node(); + INLINE BulletDebugNode *get_debug_node() const; + // Attach/Remove void attach(TypedObject *object); void remove(TypedObject *object);