16 btManifoldPoint BulletContact::_empty;
23 BulletContact() : _mp(_empty) {
35 _node0 = other._node0;
36 _node1 = other._node1;
37 _part_id0 = other._part_id0;
38 _part_id1 = other._part_id1;
47 BulletContactResult() : btCollisionWorld::ContactResultCallback() {
49 #if BT_BULLET_VERSION >= 281 51 _filter_proxy =
nullptr;
56 #if BT_BULLET_VERSION >= 281 60 void BulletContactResult::
61 use_filter(btOverlapFilterCallback *cb, btBroadphaseProxy *proxy) {
67 _filter_proxy = proxy;
74 bool BulletContactResult::
75 needsCollision(btBroadphaseProxy *proxy0)
const {
78 return _filter_cb->needBroadphaseCollision(proxy0, _filter_proxy);
88 btScalar BulletContactResult::
89 addSingleResult(btManifoldPoint &mp,
90 const btCollisionObjectWrapper *wrap0,
int part_id0,
int idx0,
91 const btCollisionObjectWrapper *wrap1,
int part_id1,
int idx1) {
93 const btCollisionObject *obj0 = wrap0->getCollisionObject();
94 const btCollisionObject *obj1 = wrap1->getCollisionObject();
99 contact._node0 = obj0 ? (
PandaNode *)obj0->getUserPointer() :
nullptr;
100 contact._node1 = obj1 ? (
PandaNode *)obj1->getUserPointer() :
nullptr;
101 contact._part_id0 = part_id0;
102 contact._part_id1 = part_id1;
103 contact._idx0 = idx0;
104 contact._idx1 = idx1;
106 _contacts.push_back(contact);
114 btScalar BulletContactResult::
115 addSingleResult(btManifoldPoint &mp,
116 const btCollisionObject *obj0,
int part_id0,
int idx0,
117 const btCollisionObject *obj1,
int part_id1,
int idx1) {
122 contact._node0 = obj0 ? (
PandaNode *)obj0->getUserPointer() :
nullptr;
123 contact._node1 = obj1 ? (
PandaNode *)obj1->getUserPointer() :
nullptr;
124 contact._part_id0 = part_id0;
125 contact._part_id1 = part_id1;
126 contact._idx0 = idx0;
127 contact._idx1 = idx1;
129 _contacts.push_back(contact);
A basic node of the scene graph or data graph.