30 m_isSwapped(isSwapped),
31 m_numPerturbationIterations(numPerturbationIterations),
32 m_minimumPointsPerturbationThreshold(minimumPointsPerturbationThreshold)
62 bool hasCollision =
false;
76 btVector3 vtxInPlane = convexInPlaneTrans(vtx);
77 btScalar distance = (planeNormal.
dot(vtxInPlane) - planeConstant);
79 btVector3 vtxInPlaneProjected = vtxInPlane - distance*planeNormal;
106 bool hasCollision =
false;
115 btVector3 vtxInPlane = convexInPlaneTrans(vtx);
116 btScalar distance = (planeNormal.
dot(vtxInPlane) - planeConstant);
118 btVector3 vtxInPlaneProjected = vtxInPlane - distance*planeNormal;
144 if ( perturbeAngle > angleLimit )
145 perturbeAngle = angleLimit;
152 collideSingleContact(rotq.inverse()*perturbeRot*rotq,body0Wrap,body1Wrap,dispatchInfo,resultOut);
virtual void releaseManifold(btPersistentManifold *manifold)=0
const btPersistentManifold * getPersistentManifold() const
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
virtual btVector3 localGetSupportingVertex(const btVector3 &vec) const =0
btScalar getContactBreakingThreshold() const
virtual void processCollision(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
void setPersistentManifold(btPersistentManifold *manifoldPtr)
const btVector3 & getPlaneNormal() const
void btPlaneSpace1(const T &n, T &p, T &q)
void refreshContactPoints()
virtual ~btConvexPlaneCollisionAlgorithm()
btManifoldResult is a helper class to manage contact results.
int m_numPerturbationIterations
btScalar dot(const btVector3 &v) const
Return the dot product.
btDispatcher * m_dispatcher
virtual btScalar calculateTimeOfImpact(btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
The btConvexShape is an abstract shape interface, implemented by all convex shapes such as btBoxShape...
btPersistentManifold * m_manifoldPtr
virtual void addContactPoint(const btVector3 &normalOnBInWorld, const btVector3 &pointInWorld, btScalar depth)
const btTransform & getWorldTransform() const
btCollisionObject can be used to manage collision detection objects.
virtual btPersistentManifold * getNewManifold(const btCollisionObject *b0, const btCollisionObject *b1)=0
btConvexPlaneCollisionAlgorithm(btPersistentManifold *mf, const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped, int numPerturbationIterations, int minimumPointsPerturbationThreshold)
const btCollisionShape * getCollisionShape() const
virtual btScalar getAngularMotionDisc() const
getAngularMotionDisc returns the maximus radius needed for Conservative Advancement to handle time-of...
btVector3 can be used to represent 3D points and vectors.
void collideSingleContact(const btQuaternion &perturbeRot, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
bool isPolyhedral() const
int getNumContacts() const
int m_minimumPointsPerturbationThreshold
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatr...
The btStaticPlaneShape simulates an infinite non-moving (static) collision plane. ...
virtual bool needsCollision(const btCollisionObject *body0, const btCollisionObject *body1)=0
btCollisionAlgorithm is an collision interface that is compatible with the Broadphase and btDispatche...
btScalar gContactBreakingThreshold
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
const btScalar & getPlaneConstant() const
const btCollisionObject * getCollisionObject() const