started working on some serious performance improvements. now the union find is optimized, the broadphase add/remove overlapping pair was too slow. added a stl::set to keep track of overlapping pairs. this speeds up the set find/remove. work in progress.the SimpleBroadphase is broken. will be fixed tomorrow.
Did some tests with 3000 rigidbodies, works much smoother now :)
This commit is contained in:
@@ -27,7 +27,7 @@ subject to the following restrictions:
|
||||
#include "BMF_Api.h"
|
||||
|
||||
int numObjects = 0;
|
||||
const int maxNumObjects = 450;
|
||||
const int maxNumObjects = 4096;
|
||||
DefaultMotionState ms[maxNumObjects];
|
||||
CcdPhysicsController* physObjects[maxNumObjects];
|
||||
SimdTransform startTransforms[maxNumObjects];
|
||||
@@ -335,6 +335,9 @@ void DemoApplication::keyboardCallback(unsigned char key, int x, int y)
|
||||
break;
|
||||
}
|
||||
|
||||
if (m_physicsEnvironmentPtr)
|
||||
m_physicsEnvironmentPtr->setDebugMode(m_debugMode);
|
||||
|
||||
glutPostRedisplay();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user