14#ifndef __BULLET_CONTACT_CALLBACKS_H__
15#define __BULLET_CONTACT_CALLBACKS_H__
38contact_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) {
92 LightMutex &mutex = BulletWorld::get_global_lock();
95 bullet_contact_added_callback->do_callback(&cbdata);
107contact_processed_callback(btManifoldPoint &cp,
132contact_destroyed_callback(
void *userPersistentData) {
133 if (bullet_cat.is_debug()) {
134 bullet_cat.debug() <<
"contact removed: " << userPersistentData << std::endl;
140 if (bullet_enable_contact_events) {
142 Event *
event =
new Event(
"bullet-contact-destroyed");
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
void release() const
Releases the lightMutex.
void acquire() const
Grabs the lightMutex if it is available.
This is a standard, non-reentrant mutex, similar to the Mutex class.
A basic node of the scene graph or data graph.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.