31 m_numPerturbationIterations(numPerturbationIterations),
32 m_minimumPointsPerturbationThreshold(minimumPointsPerturbationThreshold)
61 bool hasCollision =
false;
62 const btVector3& planeNormal = planeShape->getPlaneNormal();
63 const btScalar& planeConstant = planeShape->getPlaneConstant();
67 convexInPlaneTrans = planeObjWrap->
getWorldTransform().inverse() * convexWorldTransform;
69 convexWorldTransform.getBasis() *=
btMatrix3x3(perturbeRot);
71 planeInConvex = convexWorldTransform.inverse() * planeObjWrap->
getWorldTransform();
73 btVector3 vtx = convexShape->localGetSupportingVertex(planeInConvex.getBasis() * -planeNormal);
75 btVector3 vtxInPlane = convexInPlaneTrans(vtx);
81 hasCollision =
distance < m_manifoldPtr->getContactBreakingThreshold();
104 bool hasCollision =
false;
105 const btVector3& planeNormal = planeShape->getPlaneNormal();
106 const btScalar& planeConstant = planeShape->getPlaneConstant();
112 btVector3 vtx = convexShape->localGetSupportingVertex(planeInConvex.getBasis() * -planeNormal);
113 btVector3 vtxInPlane = convexInPlaneTrans(vtx);
132 if (convexShape->isPolyhedral() && resultOut->
getPersistentManifold()->getNumContacts() < m_minimumPointsPerturbationThreshold)
140 btScalar radius = convexShape->getAngularMotionDisc();
142 if (perturbeAngle > angleLimit)
143 perturbeAngle = angleLimit;
146 for (
int i = 0; i < m_numPerturbationIterations; i++)
150 collideSingleContact(rotq.inverse() * perturbeRot * rotq, body0Wrap, body1Wrap, dispatchInfo, resultOut);
156 if (m_manifoldPtr->getNumContacts())
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
btScalar gContactBreakingThreshold
btPersistentManifold * m_manifoldPtr
btConvexShape()
not supported on IBM SDK, until we fix the alignment of btVector3
btMatrix3x3
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btStaticPlaneShape(const btVector3 &planeNormal, btScalar planeConstant)
SIMD_FORCE_INLINE void btPlaneSpace1(const T &n, T &p, T &q)
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
btDispatcher * m_dispatcher
virtual ~btConvexPlaneCollisionAlgorithm()
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)
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)
virtual void releaseManifold(btPersistentManifold *manifold)=0
virtual btPersistentManifold * getNewManifold(const btCollisionObject *b0, const btCollisionObject *b1)=0
virtual bool needsCollision(const btCollisionObject *body0, const btCollisionObject *body1)=0
btManifoldResult is a helper class to manage contact results.
const btPersistentManifold * getPersistentManifold() const
void setPersistentManifold(btPersistentManifold *manifoldPtr)
btScalar m_closestPointDistanceThreshold
SIMD_FORCE_INLINE void refreshContactPoints()
virtual void addContactPoint(const btVector3 &normalOnBInWorld, const btVector3 &pointInWorld, btScalar depth)
The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatr...
SyclQueue void void size_t num_bytes void
T distance(const T &a, const T &b)
SIMD_FORCE_INLINE const btCollisionShape * getCollisionShape() const
SIMD_FORCE_INLINE const btTransform & getWorldTransform() const
SIMD_FORCE_INLINE const btCollisionObject * getCollisionObject() const