Add better support for btCollisionWorld::convexSweepTest for btStaticPlaneShape, now using the btContinuousConvexCollision directly.

Bugfix in btKinematicCharacterController, using an uninitialized variable
This commit is contained in:
erwin.coumans
2011-04-01 16:33:55 +00:00
parent 08a93b28f0
commit b1f21a7e6a
4 changed files with 154 additions and 74 deletions

View File

@@ -21,6 +21,7 @@ subject to the following restrictions:
#include "btSimplexSolverInterface.h"
class btConvexPenetrationDepthSolver;
class btConvexShape;
class btStaticPlaneShape;
/// btContinuousConvexCollision implements angular and linear time of impact for convex objects.
/// Based on Brian Mirtich's Conservative Advancement idea (PhD thesis).
@@ -31,13 +32,18 @@ class btContinuousConvexCollision : public btConvexCast
btSimplexSolverInterface* m_simplexSolver;
btConvexPenetrationDepthSolver* m_penetrationDepthSolver;
const btConvexShape* m_convexA;
const btConvexShape* m_convexB;
//second object is either a convex or a plane (code sharing)
const btConvexShape* m_convexB1;
const btStaticPlaneShape* m_planeShape;
void computeClosestPoints( const btTransform& transA, const btTransform& transB,struct btPointCollector& pointCollector);
public:
btContinuousConvexCollision (const btConvexShape* shapeA,const btConvexShape* shapeB ,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver);
btContinuousConvexCollision(const btConvexShape* shapeA,const btStaticPlaneShape* plane );
virtual bool calcTimeOfImpact(
const btTransform& fromA,
const btTransform& toA,
@@ -48,5 +54,6 @@ public:
};
#endif //CONTINUOUS_COLLISION_CONVEX_CAST_H