14 #ifndef __BULLET_CONTACT_CALLBACKS_H__
15 #define __BULLET_CONTACT_CALLBACKS_H__
38 contact_added_callback(btManifoldPoint &cp,
39 #
if BT_BULLET_VERSION >= 281
40 const btCollisionObjectWrapper *wrap0,
42 const btCollisionObject *obj0,
46 #
if BT_BULLET_VERSION >= 281
47 const btCollisionObjectWrapper *wrap1,
49 const btCollisionObject *obj1,
54 if (cp.m_userPersistentData ==
nullptr) {
56 #if BT_BULLET_VERSION >= 281
64 if (bullet_cat.is_debug()) {
65 bullet_cat.debug() <<
"contact added: " << cp.m_userPersistentData << std::endl;
73 cp.m_userPersistentData = (
void *)data;
76 if (bullet_enable_contact_events) {
78 Event *
event =
new Event(
"bullet-contact-added");
86 if (bullet_contact_added_callback) {
91 bullet_contact_added_callback->do_callback(&cbdata);
102 contact_processed_callback(btManifoldPoint &cp,
127 contact_destroyed_callback(
void *userPersistentData) {
128 if (bullet_cat.is_debug()) {
129 bullet_cat.debug() <<
"contact removed: " << userPersistentData << std::endl;
135 if (bullet_enable_contact_events) {
137 Event *
event =
new Event(
"bullet-contact-destroyed");
150 #endif // __BULLET_CONTACT_CALLBACKS_H__