16#ifndef BT_DEFORMABLE_MULTIBODY_DYNAMICS_WORLD_H
17#define BT_DEFORMABLE_MULTIBODY_DYNAMICS_WORLD_H
200 btVector3 rayDir = (rayToWorld - rayFromWorld);
228#ifdef RECALCULATE_AABB
229 btVector3 collisionObjectAabbMin,collisionObjectAabbMax;
259#ifndef USE_BRUTEFORCE_RAYBROADPHASE
294 if (normal.
dot(rayDir) > 0)
305 bool normalInWorldSpace =
true;
btAlignedObjectArray< btSoftBody * > btSoftBodyArray
@ BT_DEFORMABLE_MULTIBODY_DYNAMICS_WORLD
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
The btBroadphaseInterface class provides an interface to detect aabb-overlapping object pairs.
virtual void rayTest(const btVector3 &rayFrom, const btVector3 &rayTo, btBroadphaseRayCallback &rayCallback, const btVector3 &aabbMin=btVector3(0, 0, 0), const btVector3 &aabbMax=btVector3(0, 0, 0))=0
btCollisionConfiguration allows to configure Bullet collision detection stack allocator size,...
btCollisionObject can be used to manage collision detection objects.
btTransform & getWorldTransform()
btBroadphaseProxy * getBroadphaseHandle()
const btCollisionShape * getCollisionShape() const
The btCollisionShape class provides an interface for collision shapes that can be shared among btColl...
virtual void getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const =0
getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t.
btBroadphaseInterface * m_broadphasePairCache
btAlignedObjectArray< btCollisionObject * > m_collisionObjects
int getNumCollisionObjects() const
static void rayTestSingle(const btTransform &rayFromTrans, const btTransform &rayToTrans, btCollisionObject *collisionObject, const btCollisionShape *collisionShape, const btTransform &colObjWorldTransform, RayResultCallback &resultCallback)
rayTestSingle performs a raycast call and calls the resultCallback.
void(* btSolverCallback)(btScalar time, btDeformableMultiBodyDynamicsWorld *world)
void setImplicit(bool implicit)
void setLineSearch(bool lineSearch)
const btSoftBodyWorldInfo & getWorldInfo() const
void applyRigidBodyGravity(btScalar timeStep)
btSoftBodyWorldInfo & getWorldInfo()
void solveMultiBodyConstraints()
void setUseProjection(bool useProjection)
btDeformableMultiBodyDynamicsWorld(btDispatcher *dispatcher, btBroadphaseInterface *pairCache, btDeformableMultiBodyConstraintSolver *constraintSolver, btCollisionConfiguration *collisionConfiguration, btDeformableBodySolver *deformableBodySolver=0)
void removeCollisionObject(btCollisionObject *collisionObject)
removeCollisionObject will first check if it is a rigid body, if so call removeRigidBody otherwise ca...
virtual void addSoftBody(btSoftBody *body, int collisionFilterGroup=btBroadphaseProxy::DefaultFilter, int collisionFilterMask=btBroadphaseProxy::AllFilter)
void removeSoftBodyForce(btSoftBody *psb)
const btSoftBodyArray & getSoftBodyArray() const
void removeSoftBody(btSoftBody *body)
void reinitialize(btScalar timeStep)
void positionCorrection(btScalar timeStep)
virtual void predictUnconstraintMotion(btScalar timeStep)
void afterSolverCallbacks(btScalar timeStep)
void applyRepulsionForce(btScalar timeStep)
void rayTestSingle(const btTransform &rayFromTrans, const btTransform &rayToTrans, btCollisionObject *collisionObject, const btCollisionShape *collisionShape, const btTransform &colObjWorldTransform, RayResultCallback &resultCallback) const
virtual void debugDrawWorld()
void solveConstraints(btScalar timeStep)
btAlignedObjectArray< btVector3 > TVStack
void addForce(btSoftBody *psb, btDeformableLagrangianForce *force)
void softBodySelfCollision()
btSolverCallback m_solverCallback
void performGeometricCollisions(btScalar timeStep)
void rayTest(const btVector3 &rayFromWorld, const btVector3 &rayToWorld, RayResultCallback &resultCallback) const
rayTest performs a raycast on all objects in the btCollisionWorld, and calls the resultCallback This ...
virtual void integrateTransforms(btScalar timeStep)
virtual btDynamicsWorldType getWorldType() const
void removeForce(btSoftBody *psb, btDeformableLagrangianForce *force)
btSoftBodyWorldInfo m_sbi
virtual void internalSingleStepSimulation(btScalar timeStep)
void updateActivationState(btScalar timeStep)
virtual ~btDeformableMultiBodyDynamicsWorld()
void solveContactConstraints()
virtual int stepSimulation(btScalar timeStep, int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.))
if maxSubSteps > 0, it will interpolate motion between fixedTimeStep's
btSoftBodyArray m_softBodies
void setSolverCallback(btSolverCallback cb)
virtual const btMultiBodyDynamicsWorld * getMultiBodyDynamicsWorld() const
DeformableBodyInplaceSolverIslandCallback * m_solverDeformableBodyIslandCallback
virtual void setGravity(const btVector3 &gravity)
btSoftBodyArray & getSoftBodyArray()
void beforeSolverCallbacks(btScalar timeStep)
void performDeformableCollisionDetection()
btDeformableBodySolver * m_deformableBodySolver
Solver classes that encapsulate multiple deformable bodies for solving.
virtual btMultiBodyDynamicsWorld * getMultiBodyDynamicsWorld()
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
The btMultiBodyDynamicsWorld adds Featherstone multi body dynamics to Bullet This implementation is s...
The btSoftBody is an class to simulate cloth and volumetric soft bodies.
bool rayFaceTest(const btVector3 &rayFrom, const btVector3 &rayTo, sRayCast &results)
static const btSoftBody * upcast(const btCollisionObject *colObj)
btVector3 can be used to represent 3D points and vectors.
btScalar dot(const btVector3 &v) const
Return the dot product.
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
The btBroadphaseProxy is the main class that can be used with the Bullet broadphases.
btVector3 m_rayDirectionInverse
added some cached data to accelerate ray-AABB tests
LocalShapeInfo gives extra information for complex shapes Currently, only btTriangleMeshShape is avai...
RayResultCallback is used to report new raycast results.
btScalar m_closestHitFraction
virtual bool needsCollision(btBroadphaseProxy *proxy0) const
virtual btScalar addSingleResult(LocalRayResult &rayResult, bool normalInWorldSpace)=0
btDeformableSingleRayCallback(const btVector3 &rayFromWorld, const btVector3 &rayToWorld, const btDeformableMultiBodyDynamicsWorld *world, btCollisionWorld::RayResultCallback &resultCallback)
const btDeformableMultiBodyDynamicsWorld * m_world
virtual bool process(const btBroadphaseProxy *proxy)
btTransform m_rayFromTrans
btCollisionWorld::RayResultCallback & m_resultCallback
btScalar fraction
feature index