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