mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 00:06:44 -04:00
bullet: fix various unprotected debug() prints
This commit is contained in:
parent
c54f964a3b
commit
0e27f19d94
@ -61,7 +61,9 @@ contact_added_callback(btManifoldPoint &cp,
|
|||||||
PT(PandaNode) node1 = (PandaNode *)obj1->getUserPointer();
|
PT(PandaNode) node1 = (PandaNode *)obj1->getUserPointer();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bullet_cat.debug() << "contact added: " << cp.m_userPersistentData << std::endl;
|
if (bullet_cat.is_debug()) {
|
||||||
|
bullet_cat.debug() << "contact added: " << cp.m_userPersistentData << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
// Gather persistent data
|
// Gather persistent data
|
||||||
UserPersistentData *data = new UserPersistentData();
|
UserPersistentData *data = new UserPersistentData();
|
||||||
@ -123,8 +125,9 @@ contact_processed_callback(btManifoldPoint &cp,
|
|||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
contact_destroyed_callback(void *userPersistentData) {
|
contact_destroyed_callback(void *userPersistentData) {
|
||||||
|
if (bullet_cat.is_debug()) {
|
||||||
bullet_cat.debug() << "contact removed: " << userPersistentData << std::endl;
|
bullet_cat.debug() << "contact removed: " << userPersistentData << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
UserPersistentData *data = (UserPersistentData *)userPersistentData;
|
UserPersistentData *data = (UserPersistentData *)userPersistentData;
|
||||||
|
|
||||||
|
@ -384,8 +384,9 @@ drawTriangle(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2, cons
|
|||||||
*/
|
*/
|
||||||
void BulletDebugNode::DebugDraw::
|
void BulletDebugNode::DebugDraw::
|
||||||
drawTriangle(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2, const btVector3 &n0, const btVector3 &n1, const btVector3 &n2, const btVector3 &color, btScalar alpha) {
|
drawTriangle(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2, const btVector3 &n0, const btVector3 &n1, const btVector3 &n2, const btVector3 &color, btScalar alpha) {
|
||||||
|
if (bullet_cat.is_debug()) {
|
||||||
bullet_cat.debug() << "drawTriangle(2) - not yet implemented!" << std::endl;
|
bullet_cat.debug() << "drawTriangle(2) - not yet implemented!" << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -405,8 +406,9 @@ drawContactPoint(const btVector3 &point, const btVector3 &normal, btScalar dista
|
|||||||
*/
|
*/
|
||||||
void BulletDebugNode::DebugDraw::
|
void BulletDebugNode::DebugDraw::
|
||||||
draw3dText(const btVector3 &location, const char *text) {
|
draw3dText(const btVector3 &location, const char *text) {
|
||||||
|
if (bullet_cat.is_debug()) {
|
||||||
bullet_cat.debug() << "draw3dText - not yet implemented!" << std::endl;
|
bullet_cat.debug() << "draw3dText - not yet implemented!" << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -207,7 +207,9 @@ init_libbullet() {
|
|||||||
|
|
||||||
// Initialize notification category
|
// Initialize notification category
|
||||||
bullet_cat.init();
|
bullet_cat.init();
|
||||||
bullet_cat.debug() << "initialize module" << std::endl;
|
if (bullet_cat.is_debug()) {
|
||||||
|
bullet_cat.debug() << "initialize module" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
// Register the Bullet system
|
// Register the Bullet system
|
||||||
PandaSystem *ps = PandaSystem::get_global_ptr();
|
PandaSystem *ps = PandaSystem::get_global_ptr();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user