Skip to content

Commit 5d2110c

Browse files
committed
bullet: add force_update_all_aabbs property to BulletWorld
1 parent b10ee32 commit 5d2110c

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

panda/src/bullet/bulletWorld.cxx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,24 @@ get_group_collision_flag(unsigned int group1, unsigned int group2) const {
11041104
return _filter_cb2._collide[group1].get_bit(group2);
11051105
}
11061106

1107+
/**
1108+
*
1109+
*/
1110+
void BulletWorld::
1111+
set_force_update_all_aabbs(bool force) {
1112+
LightMutexHolder holder(get_global_lock());
1113+
_world->setForceUpdateAllAabbs(force);
1114+
}
1115+
1116+
/**
1117+
*
1118+
*/
1119+
bool BulletWorld::
1120+
get_force_update_all_aabbs() const {
1121+
LightMutexHolder holder(get_global_lock());
1122+
return _world->getForceUpdateAllAabbs();
1123+
}
1124+
11071125
/**
11081126
*
11091127
*/

panda/src/bullet/bulletWorld.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ class EXPCL_PANDABULLET BulletWorld : public TypedReferenceCount {
134134
void set_group_collision_flag(unsigned int group1, unsigned int group2, bool enable);
135135
bool get_group_collision_flag(unsigned int group1, unsigned int group2) const;
136136

137+
void set_force_update_all_aabbs(bool force);
138+
bool get_force_update_all_aabbs() const;
139+
137140
// Callbacks
138141
void set_contact_added_callback(CallbackObject *obj);
139142
void clear_contact_added_callback();
@@ -166,6 +169,8 @@ class EXPCL_PANDABULLET BulletWorld : public TypedReferenceCount {
166169
MAKE_SEQ_PROPERTY(vehicles, get_num_vehicles, get_vehicle);
167170
MAKE_SEQ_PROPERTY(constraints, get_num_constraints, get_constraint);
168171
MAKE_SEQ_PROPERTY(manifolds, get_num_manifolds, get_manifold);
172+
MAKE_PROPERTY(force_update_all_aabbs, get_force_update_all_aabbs,
173+
set_force_update_all_aabbs);
169174

170175
PUBLISHED: // Deprecated methods, will be removed soon
171176
void attach_ghost(BulletGhostNode *node);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy