33#define BT_SOFTBODY_TRIANGLE_EXTRUSION btScalar(0.06)
37 m_isSwapped(isSwapped),
38 m_btSoftBodyTriangleCallback(ci.m_dispatcher1, body0Wrap, body1Wrap, isSwapped)
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;
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;
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
void * getUserPointer() const
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
void insert(const Key &key, const Value &value)
const Value * getAtIndex(int index) const
virtual void drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &color)=0
virtual int getDebugMode() const =0
btManifoldResult is a helper class to manage contact results.
btScalar m_closestPointDistanceThreshold
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
const btVector3 & getAabbMax() const
btScalar m_collisionMarginTriangle
btManifoldResult * m_resultOut
virtual ~btSoftBodyTriangleCallback()
const btVector3 & getAabbMin() const
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.
btSoftBodyWorldInfo * getWorldInfo()
virtual void getAabb(btVector3 &aabbMin, btVector3 &aabbMax) const
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 btIDebugDraw * m_debugDraw
btSparseSdf< 3 > m_sparsesdf
int RemoveReferences(btCollisionShape *pcs)
class btCollisionShape * m_childShape