15 #ifndef __BULLET_CONTACT_CALLBACKS_H__
16 #define __BULLET_CONTACT_CALLBACKS_H__
18 #include "pandabase.h"
20 #include "bullet_includes.h"
21 #include "bulletWorld.h"
22 #include "bulletContactCallbackData.h"
23 #include "config_bullet.h"
26 #include "eventQueue.h"
27 #include "eventParameter.h"
28 #include "pandaNode.h"
40 contact_added_callback(btManifoldPoint &cp,
41 #
if BT_BULLET_VERSION >= 281
42 const btCollisionObjectWrapper *wrap0,
44 const btCollisionObject *obj0,
48 #
if BT_BULLET_VERSION >= 281
49 const btCollisionObjectWrapper *wrap1,
51 const btCollisionObject *obj1,
56 if (cp.m_userPersistentData == NULL) {
58 #if BT_BULLET_VERSION >= 281
66 bullet_cat.debug() <<
"contact added: " << cp.m_userPersistentData << 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);
103 contact_processed_callback(btManifoldPoint &cp,
129 contact_destroyed_callback(
void *userPersistentData) {
131 bullet_cat.debug() <<
"contact removed: " << userPersistentData << endl;
136 if (bullet_enable_contact_events) {
138 Event *
event =
new Event(
"bullet-contact-destroyed");
151 #endif // __BULLET_CONTACT_CALLBACKS_H__
A basic node of the scene graph or data graph.
An optional parameter associated with an event.
static EventQueue * get_global_event_queue()
Returns a pointer to the one global EventQueue object.
A named event, possibly with parameters.