Switch off an optimization by default, to avoid support burden: update all objects AABBs and not just the active objects.
Call world->setForceUpdateAllAabbs( false) to re-enable the optimization: it will only update active objects (skipping static geometry) See also http://bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=4073
This commit is contained in:
@@ -94,7 +94,10 @@ protected:
|
||||
|
||||
btIDebugDraw* m_debugDrawer;
|
||||
|
||||
|
||||
///m_forceUpdateAllAabbs can be set to false as an optimization to only update active object AABBs
|
||||
///it is true by default, because it is error-prone (setting the position of static objects wouldn't update their AABB)
|
||||
bool m_forceUpdateAllAabbs;
|
||||
|
||||
public:
|
||||
|
||||
//this constructor doesn't own the dispatcher and paircache/broadphase
|
||||
@@ -403,6 +406,15 @@ public:
|
||||
{
|
||||
return m_dispatchInfo;
|
||||
}
|
||||
|
||||
bool getForceUpdateAllAabbs() const
|
||||
{
|
||||
return m_forceUpdateAllAabbs;
|
||||
}
|
||||
void setForceUpdateAllAabbs( bool forceUpdateAllAabbs)
|
||||
{
|
||||
m_forceUpdateAllAabbs = forceUpdateAllAabbs;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user