diff options
Diffstat (limited to 'extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp')
-rw-r--r-- | extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp index fb0d9fdb75a..88018b4c624 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp @@ -48,7 +48,7 @@ btConvexShape::~btConvexShape() } -void btConvexShape::project(const btTransform& trans, const btVector3& dir, btScalar& min, btScalar& max) const +void btConvexShape::project(const btTransform& trans, const btVector3& dir, btScalar& min, btScalar& max, btVector3& witnesPtMin,btVector3& witnesPtMax) const { btVector3 localAxis = dir*trans.getBasis(); btVector3 vtx1 = trans(localGetSupportingVertex(localAxis)); @@ -56,12 +56,16 @@ void btConvexShape::project(const btTransform& trans, const btVector3& dir, btSc min = vtx1.dot(dir); max = vtx2.dot(dir); - + witnesPtMax = vtx2; + witnesPtMin = vtx1; + if(min>max) { btScalar tmp = min; min = max; max = tmp; + witnesPtMax = vtx1; + witnesPtMin = vtx2; } } |