- Added compressed/quantized AABB tree, 16 bytes per node, while supporting 32-bit (triangle) indices. Should be faster and smaller then original version (quantized aabb check is done in integer space)
Original aabb nodes are 44 bytes (with full floating point precision and additional part index) - added meter-unit scaling support in ColladaConverter.cpp
This commit is contained in:
@@ -149,7 +149,8 @@ void ConcaveDemo::initPhysics()
|
||||
indexStride,
|
||||
totalVerts,(btScalar*) &gVertices[0].x(),vertStride);
|
||||
|
||||
btCollisionShape* trimeshShape = new btBvhTriangleMeshShape(indexVertexArrays);
|
||||
bool useQuantizedAabbCompression = true;
|
||||
btCollisionShape* trimeshShape = new btBvhTriangleMeshShape(indexVertexArrays,useQuantizedAabbCompression);
|
||||
|
||||
|
||||
// btCollisionShape* groundShape = new btBoxShape(btVector3(50,3,50));
|
||||
@@ -159,6 +160,7 @@ void ConcaveDemo::initPhysics()
|
||||
btOverlappingPairCache* pairCache = new btAxisSweep3(worldMin,worldMax);
|
||||
btConstraintSolver* constraintSolver = new btSequentialImpulseConstraintSolver();
|
||||
m_dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher,pairCache,constraintSolver);
|
||||
m_dynamicsWorld->setDebugDrawer(&debugDrawer);
|
||||
|
||||
float mass = 0.f;
|
||||
btTransform startTransform;
|
||||
|
||||
Reference in New Issue
Block a user