mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
Added method to retrieve debug node from bullet world.
This commit is contained in:
parent
21472cda9b
commit
f3b4ba8fc8
@ -54,6 +54,43 @@ INLINE BulletWorld::
|
|||||||
delete _broadphase;
|
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
|
// Function: BulletWorld::get_world
|
||||||
// Access: Public
|
// Access: Public
|
||||||
|
@ -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
|
// Function: BulletWorld::attach
|
||||||
// Access: Published
|
// Access: Published
|
||||||
|
@ -61,11 +61,13 @@ PUBLISHED:
|
|||||||
|
|
||||||
int do_physics(PN_stdfloat dt, int max_substeps=1, PN_stdfloat stepsize=1.0f/60.0f);
|
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();
|
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
|
// Attach/Remove
|
||||||
void attach(TypedObject *object);
|
void attach(TypedObject *object);
|
||||||
void remove(TypedObject *object);
|
void remove(TypedObject *object);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user