+ Internal improvements for collision shapes
1) add AabbCaching versions of btPolyhedralConvexShape and btMultiSphereShape (this speeds up btMultiSphereShape 'getAabb', and reduces size of btBoxShape) 2) btCylinderShape doesn't derive from btBoxShape anymore + Minor fixes in drawing for btMultiSphereShape, btBoxShape. + Don't re-generate btDebugFont every frame + Disabled velocity prediction for btDbvtBroadphase. Previous default can be restored using btDbvtBroadphase->setVelocityPrediction(1./2.);
This commit is contained in:
@@ -20,7 +20,7 @@ subject to the following restrictions:
|
||||
#include "LinearMath/btQuaternion.h"
|
||||
|
||||
btMultiSphereShape::btMultiSphereShape (const btVector3& inertiaHalfExtents,const btVector3* positions,const btScalar* radi,int numSpheres)
|
||||
:btConvexInternalShape (), m_inertiaHalfExtents(inertiaHalfExtents)
|
||||
:btConvexInternalAabbCachingShape (), m_inertiaHalfExtents(inertiaHalfExtents)
|
||||
{
|
||||
m_shapeType = MULTI_SPHERE_SHAPE_PROXYTYPE;
|
||||
btScalar startMargin = btScalar(1e30);
|
||||
@@ -34,6 +34,7 @@ btMultiSphereShape::btMultiSphereShape (const btVector3& inertiaHalfExtents,cons
|
||||
|
||||
}
|
||||
|
||||
recalcLocalAabb();
|
||||
|
||||
}
|
||||
|
||||
@@ -149,4 +150,3 @@ void btMultiSphereShape::calculateLocalInertia(btScalar mass,btVector3& inertia)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user