Make raycast benchmark default, to show improved raycasting performance.
Add rayTest to btBroadphaseInterface, and implement efficient version for btDbvtBroadphase to accelerate raycasting. btAxisSweep3, btSimpleBroadphase and btMultiSapBroadphase implement brute-force method (as before). For now, it is recommended to use btDbvtBroadphase for fastest world raycast.
This commit is contained in:
@@ -272,9 +272,11 @@ void BenchmarkDemo::initPhysics()
|
||||
///Don't make the world AABB size too large, it will harm simulation quality and performance
|
||||
btVector3 worldAabbMin(-10000,-10000,-10000);
|
||||
btVector3 worldAabbMax(10000,10000,10000);
|
||||
//m_overlappingPairCache = new btAxisSweep3(worldAabbMin,worldAabbMax,3500);
|
||||
|
||||
// m_overlappingPairCache = new btAxisSweep3(worldAabbMin,worldAabbMax,3500);
|
||||
// m_overlappingPairCache = new btSimpleBroadphase();
|
||||
m_overlappingPairCache = new btDbvtBroadphase();
|
||||
|
||||
|
||||
|
||||
///the default constraint solver. For parallel processing you can use a different solver (see Extras/BulletMultiThreaded)
|
||||
btSequentialImpulseConstraintSolver* sol = new btSequentialImpulseConstraintSolver;
|
||||
|
||||
@@ -26,13 +26,13 @@ int main(int argc,char** argv)
|
||||
{
|
||||
GLDebugDrawer gDebugDrawer;
|
||||
|
||||
BenchmarkDemo1 benchmarkDemo;
|
||||
// BenchmarkDemo1 benchmarkDemo;
|
||||
// BenchmarkDemo2 benchmarkDemo;
|
||||
// BenchmarkDemo3 benchmarkDemo;
|
||||
// BenchmarkDemo4 benchmarkDemo;
|
||||
// BenchmarkDemo5 benchmarkDemo;
|
||||
// BenchmarkDemo6 benchmarkDemo;
|
||||
// BenchmarkDemo7 benchmarkDemo;
|
||||
BenchmarkDemo7 benchmarkDemo;
|
||||
|
||||
|
||||
benchmarkDemo.initPhysics();
|
||||
|
||||
Reference in New Issue
Block a user