35 #define BT_SOFTBODY_TRIANGLE_EXTRUSION btScalar(0.06)//make this configurable 39 m_isSwapped(isSwapped),
40 m_btSoftBodyTriangleCallback(ci.m_dispatcher1,body0Wrap,body1Wrap,isSwapped)
127 colAlgo->~btCollisionAlgorithm();
140 btVector3 normal = (triangle[1]-triangle[0]).cross(triangle[2]-triangle[0]);
170 colAlgo->~btCollisionAlgorithm();
191 btVector3 aabbWorldSpaceMin,aabbWorldSpaceMax;
207 m_btSoftBodyTriangleCallback.clearCache();
230 m_btSoftBodyTriangleCallback.setTimeStepAndCounters(collisionMarginTriangle,triBody,dispatchInfo,resultOut);
233 concaveShape->
processAllTriangles( &m_btSoftBodyTriangleCallback,m_btSoftBodyTriangleCallback.getAabbMin(),m_btSoftBodyTriangleCallback.getAabbMax());
257 if (squareMot0 < convexbody->getCcdSquareMotionThreshold())
281 :m_ccdSphereFromTrans(from),
282 m_ccdSphereToTrans(to),
283 m_ccdSphereRadius(ccdSphereRadius),
284 m_hitFraction(hitFraction)
307 ident,ident,castResult))
328 rayAabbMin -=
btVector3(ccdRadius0,ccdRadius0,ccdRadius0);
329 rayAabbMax +=
btVector3(ccdRadius0,ccdRadius0,ccdRadius0);
332 LocalTriangleSphereCastCallback raycastCallback(convexFromLocal,convexToLocal,
351 return raycastCallback.m_hitFraction;
const btCollisionObject * m_triBody
virtual btCollisionAlgorithm * findAlgorithm(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, btPersistentManifold *sharedManifold=0)=0
virtual void processCollision(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)=0
btSoftBodyTriangleCallback(btDispatcher *dispatcher, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped)
const btDispatcherInfo * m_dispatchInfoPtr
btSoftBodyConcaveCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped)
virtual void drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &color)=0
virtual void processTriangle(btVector3 *triangle, int partId, int triangleIndex)
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
void setHitFraction(btScalar hitFraction)
virtual ~btSoftBodyTriangleCallback()
The btSphereShape implements an implicit sphere, centered around a local origin with radius...
btScalar m_collisionMarginTriangle
btManifoldResult is a helper class to manage contact results.
class btIDebugDraw * m_debugDraw
const btCollisionShape * getCollisionShape() const
btManifoldResult * m_resultOut
virtual void processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const =0
btDispatcher * m_dispatcher
const Value * getAtIndex(int index) const
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
void setUserPointer(void *userPtr)
optional user data pointer
virtual void getAabb(btVector3 &aabbMin, btVector3 &aabbMax) const
btSparseSdf< 3 > m_sparsesdf
int RemoveReferences(btCollisionShape *pcs)
btTransform & getWorldTransform()
btSoftBodyWorldInfo * getWorldInfo()
RayResult stores the closest result alternatively, add a callback method to decide about closest/all ...
btVoronoiSimplexSolver is an implementation of the closest point distance algorithm from a 1-4 points...
The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTrian...
const btCollisionObject * getCollisionObject() const
virtual bool calcTimeOfImpact(const btTransform &fromA, const btTransform &toA, const btTransform &fromB, const btTransform &toB, CastResult &result)
SimsimplexConvexCast calculateTimeOfImpact calculates the time of impact+normal for the linear cast (...
btCollisionObject can be used to manage collision detection objects.
void insert(const Key &key, const Value &value)
const btTransform & getInterpolationWorldTransform() const
virtual void freeCollisionAlgorithm(void *ptr)=0
virtual ~btSoftBodyConcaveCollisionAlgorithm()
btVector3 can be used to represent 3D points and vectors.
btSubsimplexConvexCast implements Gino van den Bergens' paper "Ray Casting against bteral Convex Obje...
btScalar getHitFraction() const
btDispatcher * m_dispatcher
The btConcaveShape class provides an interface for non-moving (static) concave shapes.
void setTimeStepAndCounters(btScalar collisionMarginTriangle, const btCollisionObjectWrapper *triObjWrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
virtual int getDebugMode() const =0
const btTransform & getWorldTransform() const
The btConvexHullShape implements an implicit convex hull of an array of vertices. ...
virtual btScalar getMargin() const
void btTransformAabb(const btVector3 &halfExtents, btScalar margin, const btTransform &t, btVector3 &aabbMinOut, btVector3 &aabbMaxOut)
void setMax(const btVector3 &other)
Set each element to the max of the current values and the values of another btVector3.
btDispatcher * m_dispatcher1
btHashMap< btHashKey< btTriIndex >, btTriIndex > m_shapeCache
btScalar getCcdSweptSphereRadius() const
Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
class btCollisionShape * m_childShape
The btSoftBody is an class to simulate cloth and volumetric soft bodies.
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
btCollisionAlgorithm is an collision interface that is compatible with the Broadphase and btDispatche...
void * getUserPointer() const
void setMin(const btVector3 &other)
Set each element to the min of the current values and the values of another btVector3.
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
const btCollisionShape * getCollisionShape() const
btScalar calculateTimeOfImpact(btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
#define BT_SOFTBODY_TRIANGLE_EXTRUSION