30 :m_simplexSolver(simplexSolver),
31 m_penetrationDepthSolver(penetrationDepthSolver),
32 m_convexA(convexA),m_convexB1(convexB),m_planeShape(0)
39 m_penetrationDepthSolver(0),
40 m_convexA(convexA),m_convexB1(0),m_planeShape(plane)
47 #define MAX_ITERATIONS 64
57 input.m_transformB = transB;
58 gjk.getClosestPoints(input,pointCollector,0);
70 convexInPlaneTrans= transB.
inverse() * convexWorldTransform;
72 planeInConvex= convexWorldTransform.
inverse() * transB;
76 btVector3 vtxInPlane = convexInPlaneTrans(vtx);
77 btScalar distance = (planeNormal.
dot(vtxInPlane) - planeConstant);
79 btVector3 vtxInPlaneProjected = vtxInPlane - distance*planeNormal;
80 btVector3 vtxInPlaneWorld = transB * vtxInPlaneProjected;
100 btVector3 linVelA,angVelA,linVelB,angVelB;
108 btScalar maxAngularProjectedVelocity = angVelA.
length() * boundingRadiusA + angVelB.
length() * boundingRadiusB;
113 if ((relLinVelocLength+maxAngularProjectedVelocity) == 0.f)
125 bool hasResult =
false;
153 btScalar projectedLinearVelocity = relLinVel.
dot(n);
154 if ((projectedLinearVelocity+ maxAngularProjectedVelocity)<=
SIMD_EPSILON)
158 while (dist > radius)
166 projectedLinearVelocity = relLinVel.
dot(n);
170 if ((projectedLinearVelocity+ maxAngularProjectedVelocity)<=
SIMD_EPSILON)
173 dLambda = dist / (projectedLinearVelocity+ maxAngularProjectedVelocity);
177 lambda = lambda + dLambda;
187 if (lambda <= lastLambda)
198 btTransform interpolatedTransA,interpolatedTransB,relativeTrans;
202 relativeTrans = interpolatedTransB.
inverseTimes(interpolatedTransA);
226 if (numIter > maxIter)