Fix in btGjkPairDetector, possibly causing a floating point overflow

Thanks Ole for the report and suggested fix:
http://code.google.com/p/bullet/issues/detail?id=220&can=1&start=200

Applied Character/btKinematicCharacterController.cpp patch:
Thanks Thomas for the patch!
http://code.google.com/p/bullet/issues/detail?id=196#makechanges

 - added a normalizedDirection member variable.  This is
     slightly more efficient than recalculating the normalized
     direction every simulation step.

 - I overloaded the m_walkDirection member variable to hold
     either the walkDirection or the Velocity, and used a boolean
     flag to determine which behavior was required.

 - The normalization behavior seemed custom, and I needed it
     twice, so I moved it to a static helper method.

 - I added the setVelocityForTimeInterval() method to the
     base interface class.  This to me is the scariest change
     since people inheriting from it will need to make changes
     (if only to add an empty function).
This commit is contained in:
erwin.coumans
2009-05-23 02:28:58 +00:00
parent badf723257
commit 0ada7cbb1e
4 changed files with 104 additions and 17 deletions

View File

@@ -30,6 +30,7 @@ public:
virtual ~btCharacterControllerInterface () {};
virtual void setWalkDirection(const btVector3& walkDirection) = 0;
virtual void setVelocityForTimeInterval(const btVector3& velocity, btScalar timeInterval) = 0;
virtual void reset () = 0;
virtual void warp (const btVector3& origin) = 0;