| Bullet Collision Detection & Physics Library
    | 
 
 
 
Go to the documentation of this file.
   27         : m_simplexSolver(simplexSolver),
 
   28           m_penetrationDepthSolver(penetrationDepthSolver),
 
   37           m_penetrationDepthSolver(0),
 
   46 #define MAX_ITERATIONS 64 
   56                 input.m_transformB = transB;
 
   57                 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;
 
   98         btVector3 linVelA, angVelA, linVelB, angVelB;
 
  105         btScalar maxAngularProjectedVelocity = angVelA.
length() * boundingRadiusA + angVelB.
length() * boundingRadiusB;
 
  106         btVector3 relLinVel = (linVelB - linVelA);
 
  110         if ((relLinVelocLength + maxAngularProjectedVelocity) == 0.f)
 
  117         bool hasResult = 
false;
 
  143                 btScalar projectedLinearVelocity = relLinVel.
dot(n);
 
  144                 if ((projectedLinearVelocity + maxAngularProjectedVelocity) <= 
SIMD_EPSILON)
 
  148                 while (dist > radius)
 
  156                         projectedLinearVelocity = relLinVel.
dot(n);
 
  159                         if ((projectedLinearVelocity + maxAngularProjectedVelocity) <= 
SIMD_EPSILON)
 
  162                         dLambda = dist / (projectedLinearVelocity + maxAngularProjectedVelocity);
 
  170                         if (lambda <= lastLambda)
 
  179                         btTransform interpolatedTransA, interpolatedTransB, relativeTrans;
 
  183                         relativeTrans = interpolatedTransB.
inverseTimes(interpolatedTransA);
 
  
void computeClosestPoints(const btTransform &transA, const btTransform &transB, struct btPointCollector &pointCollector)
const btScalar & getPlaneConstant() const
btScalar length() const
Return the length of the vector.
virtual void drawSphere(btScalar radius, const btTransform &transform, const btVector3 &color)
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
ConvexPenetrationDepthSolver provides an interface for penetration depth calculation.
virtual bool calcTimeOfImpact(const btTransform &fromA, const btTransform &toA, const btTransform &fromB, const btTransform &toB, CastResult &result)
cast a convex against another convex object
btScalar dot(const btVector3 &v) const
Return the dot product.
const btConvexShape * m_convexA
RayResult stores the closest result alternatively, add a callback method to decide about closest/all ...
virtual btVector3 localGetSupportingVertex(const btVector3 &vec) const =0
virtual btScalar getMargin() const =0
const btVector3 & getPlaneNormal() const
btGjkPairDetector uses GJK to implement the btDiscreteCollisionDetectorInterface
btSimplexSolverInterface * m_simplexSolver
const btStaticPlaneShape * m_planeShape
btVector3 can be used to represent 3D points and vectors.
virtual btScalar getAngularMotionDisc() const
getAngularMotionDisc returns the maximum radius needed for Conservative Advancement to handle time-of...
#define MAX_ITERATIONS
This maximum should not be necessary.
The btConvexShape is an abstract shape interface, implemented by all convex shapes such as btBoxShape...
const btConvexShape * m_convexB1
The btStaticPlaneShape simulates an infinite non-moving (static) collision plane.
btConvexPenetrationDepthSolver * m_penetrationDepthSolver
virtual void addContactPoint(const btVector3 &normalOnBInWorld, const btVector3 &pointInWorld, btScalar depth)
btContinuousConvexCollision(const btConvexShape *shapeA, const btConvexShape *shapeB, btSimplexSolverInterface *simplexSolver, btConvexPenetrationDepthSolver *penetrationDepthSolver)
btScalar m_allowedPenetration
virtual void reportFailure(int errNo, int numIterations)
virtual void DebugDraw(btScalar fraction)
btVector3 m_normalOnBInWorld
#define btSimplexSolverInterface
btScalar length(const btQuaternion &q)
Return the length of a quaternion.
btIDebugDraw * m_debugDrawer