Improved CharacterDemo/KinematicCharacterController, dynamic objects will bounce off.

Don't create a todo list for doxygen by default (the chaotic todo's would confuse most developers)
Improve support for small objects, by having dynamic contact breaking thresholds. Still needs small internal timestep and some GJK improvements.
This commit is contained in:
erwin.coumans
2008-11-05 03:28:10 +00:00
parent f964c2f644
commit d25d264e77
20 changed files with 81 additions and 73 deletions

View File

@@ -16,7 +16,7 @@ subject to the following restrictions:
#include "btPersistentManifold.h"
#include "LinearMath/btTransform.h"
#include <assert.h>
btScalar gContactBreakingThreshold = btScalar(0.02);
ContactDestroyedCallback gContactDestroyedCallback = 0;
@@ -66,7 +66,7 @@ void btPersistentManifold::clearUserCache(btManifoldPoint& pt)
printf("error in clearUserCache\n");
}
}
assert(occurance<=0);
btAssert(occurance<=0);
#endif //DEBUG_PERSISTENCY
if (pt.m_userPersistentData && gContactDestroyedCallback)
@@ -164,7 +164,7 @@ int btPersistentManifold::getCacheEntry(const btManifoldPoint& newPoint) const
int btPersistentManifold::addManifoldPoint(const btManifoldPoint& newPoint)
{
assert(validContactDistance(newPoint));
btAssert(validContactDistance(newPoint));
int insertIndex = getNumContacts();
if (insertIndex == MANIFOLD_CACHE_SIZE)
@@ -190,7 +190,7 @@ int btPersistentManifold::addManifoldPoint(const btManifoldPoint& newPoint)
btScalar btPersistentManifold::getContactBreakingThreshold() const
{
return gContactBreakingThreshold;
return m_contactBreakingThreshold;
}