Improved performance of convex collision shapes, cache local AABB instead of recomputation. This fixes issue with very slow performance in larger .bsp levels.

Moved some asserts into 'btFullAssert', which is disabled by default (see btScalar.h to enable them). This is to speed-up debugging.
This commit is contained in:
ejcoumans
2007-02-26 04:59:05 +00:00
parent 559c4e85d8
commit b73900bc60
18 changed files with 102 additions and 21 deletions

View File

@@ -64,7 +64,7 @@ public:
SIMD_FORCE_INLINE btVector3& operator/=(const btScalar& s)
{
assert(s != btScalar(0.0));
btFullAssert(s != btScalar(0.0));
return *this *= btScalar(1.0) / s;
}
@@ -99,7 +99,7 @@ public:
SIMD_FORCE_INLINE btScalar angle(const btVector3& v) const
{
btScalar s = btSqrt(length2() * v.length2());
assert(s != btScalar(0.0));
btFullAssert(s != btScalar(0.0));
return btAcos(dot(v) / s);
}
@@ -213,7 +213,7 @@ operator*(const btScalar& s, const btVector3& v)
SIMD_FORCE_INLINE btVector3
operator/(const btVector3& v, const btScalar& s)
{
assert(s != btScalar(0.0));
btFullAssert(s != btScalar(0.0));
return v * (btScalar(1.0) / s);
}