33#define BT_SOFTBODY_TRIANGLE_EXTRUSION btScalar(0.06)
92 m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[0]), tr(triangle[1]), color);
93 m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[1]), tr(triangle[2]), color);
94 m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[2]), tr(triangle[0]), color);
129 btVector3 normal = (triangle[1] - triangle[0]).cross(triangle[2] - triangle[0]);
134 btVector3 pts[6] = {triangle[0] + normal,
135 triangle[1] + normal,
136 triangle[2] + normal,
137 triangle[0] - normal,
138 triangle[1] - normal,
139 triangle[2] - normal};
172 btVector3 aabbWorldSpaceMin, aabbWorldSpaceMax;
173 m_softBody->getAabb(aabbWorldSpaceMin, aabbWorldSpaceMax);
175 btVector3 softBodyCenter = (aabbWorldSpaceMax + aabbWorldSpaceMin) *
btScalar(0.5);
226 if (squareMot0 < convexbody->getCcdSquareMotionThreshold())
249 : m_ccdSphereFromTrans(from),
250 m_ccdSphereToTrans(to),
251 m_ccdSphereRadius(ccdSphereRadius),
252 m_hitFraction(hitFraction)
256 virtual void processTriangle(
btVector3* triangle,
int partId,
int triangleIndex)
274 ident, ident, castResult))
289 rayAabbMin -=
btVector3(ccdRadius0, ccdRadius0, ccdRadius0);
290 rayAabbMax +=
btVector3(ccdRadius0, ccdRadius0, ccdRadius0);
293 LocalTriangleSphereCastCallback raycastCallback(convexFromLocal, convexToLocal,
310 return raycastCallback.m_hitFraction;
SIMD_FORCE_INLINE void btTransformAabb(const btVector3 &halfExtents, btScalar margin, const btTransform &t, btVector3 &aabbMinOut, btVector3 &aabbMaxOut)
@ BT_CLOSEST_POINT_ALGORITHMS
@ BT_CONTACT_POINT_ALGORITHMS
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define BT_SOFTBODY_TRIANGLE_EXTRUSION
btCollisionAlgorithm is an collision interface that is compatible with the Broadphase and btDispatche...
virtual void processCollision(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)=0
virtual ~btCollisionAlgorithm()
btCollisionObject can be used to manage collision detection objects.
btScalar getHitFraction() const
btTransform & getWorldTransform()
const btTransform & getInterpolationWorldTransform() const
const btCollisionShape * getCollisionShape() const
void setHitFraction(btScalar hitFraction)
btScalar getCcdSweptSphereRadius() const
Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
void setUserPointer(void *userPtr)
optional user data pointer
The btConcaveShape class provides an interface for non-moving (static) concave shapes.
virtual btScalar getMargin() const
virtual void processAllTriangles(btTriangleCallback *callback, const btVector3 &aabbMin, const btVector3 &aabbMax) const =0
The btConvexHullShape implements an implicit convex hull of an array of vertices.
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
virtual void freeCollisionAlgorithm(void *ptr)=0
virtual btCollisionAlgorithm * findAlgorithm(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, btPersistentManifold *sharedManifold, ebtDispatcherQueryType queryType)=0
btManifoldResult is a helper class to manage contact results.
virtual void processCollision(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
btSoftBodyTriangleCallback m_btSoftBodyTriangleCallback
btSoftBodyConcaveCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped)
btScalar calculateTimeOfImpact(btCollisionObject *body0, btCollisionObject *body1, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
virtual ~btSoftBodyConcaveCollisionAlgorithm()
const btCollisionObject * m_triBody
virtual void processTriangle(btVector3 *triangle, int partId, int triangleIndex)
const btDispatcherInfo * m_dispatchInfoPtr
btSoftBodyTriangleCallback(btDispatcher *dispatcher, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped)
btHashMap< btHashKey< btTriIndex >, btTriIndex > m_shapeCache
btScalar m_collisionMarginTriangle
btManifoldResult * m_resultOut
virtual ~btSoftBodyTriangleCallback()
void setTimeStepAndCounters(btScalar collisionMarginTriangle, const btCollisionObjectWrapper *triObjWrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut)
btDispatcher * m_dispatcher
The btSoftBody is an class to simulate cloth and volumetric soft bodies.
The btSphereShape implements an implicit sphere, centered around a local origin with radius.
btSubsimplexConvexCast implements Gino van den Bergens' paper "Ray Casting against bteral Convex Obje...
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 (...
The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTrian...
btVector3 can be used to represent 3D points and vectors.
void setMax(const btVector3 &other)
Set each element to the max of the current values and the values of another btVector3.
void setMin(const btVector3 &other)
Set each element to the min of the current values and the values of another btVector3.
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
btVoronoiSimplexSolver is an implementation of the closest point distance algorithm from a 1-4 points...
btDispatcher * m_dispatcher1
const btCollisionShape * getCollisionShape() const
const btCollisionObject * getCollisionObject() const
const btTransform & getWorldTransform() const
RayResult stores the closest result alternatively, add a callback method to decide about closest/all ...
class btCollisionShape * m_childShape