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
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
btScalar getContactBreakingThreshold() const
virtual btVector3 localGetSupportingVertex(const btVector3 &vec) const =0
virtual void processCollision(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
const btScalar & getPlaneConstant() const
void setPersistentManifold(btPersistentManifold *manifoldPtr)
int getNumContacts() const
void btPlaneSpace1(const T &n, T &p, T &q)
void refreshContactPoints()
virtual ~btConvexPlaneCollisionAlgorithm()
btManifoldResult is a helper class to manage contact results.
const btCollisionShape * getCollisionShape() const
int m_numPerturbationIterations
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)
btScalar dot(const btVector3 &v) const
Return the dot product.
const btCollisionObject * getCollisionObject() 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)
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
const btVector3 & getPlaneNormal() const
const btTransform & getWorldTransform() const
int m_minimumPointsPerturbationThreshold
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
virtual btScalar getAngularMotionDisc() const
getAngularMotionDisc returns the maximum radius needed for Conservative Advancement to handle time-of...
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...
const btPersistentManifold * getPersistentManifold() const
btScalar gContactBreakingThreshold
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...