mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-11 09:50:06 +00:00
Enabling USE_SEPDISTANCE_UTIL2 requires 100% reliable distance computation, but there are issues with large size rations. todo: fix this
Make synchronizeMotionStates() pure virtual in btDynamicsWorld and public in btDiscreteDynamicsWorld. Thanks Chunky.
This commit is contained in:
parent
3e9af21cec
commit
075ba0b9d9
@ -27,7 +27,11 @@ subject to the following restrictions:
|
||||
|
||||
class btConvexPenetrationDepthSolver;
|
||||
|
||||
#define USE_SEPDISTANCE_UTIL2 1
|
||||
///Enabling USE_SEPDISTANCE_UTIL2 requires 100% reliable distance computation. However, when using large size ratios GJK can be imprecise
|
||||
///so the distance is not conservative. In that case, enabling this USE_SEPDISTANCE_UTIL2 would result in failing/missing collisions.
|
||||
///Either improve GJK for large size ratios (testing a 100 units versus a 0.1 unit object) or only enable the util
|
||||
///for certain pairs that have a small size ratio
|
||||
///#define USE_SEPDISTANCE_UTIL2 1
|
||||
|
||||
///ConvexConvexAlgorithm collision algorithm implements time of impact, convex closest points and penetration depth calculations.
|
||||
class btConvexConvexAlgorithm : public btActivatingCollisionAlgorithm
|
||||
|
@ -60,9 +60,9 @@ protected:
|
||||
|
||||
virtual void integrateTransforms(btScalar timeStep);
|
||||
|
||||
void calculateSimulationIslands();
|
||||
virtual void calculateSimulationIslands();
|
||||
|
||||
void solveConstraints(btContactSolverInfo& solverInfo);
|
||||
virtual void solveConstraints(btContactSolverInfo& solverInfo);
|
||||
|
||||
void updateActivationState(btScalar timeStep);
|
||||
|
||||
@ -72,9 +72,8 @@ protected:
|
||||
|
||||
virtual void internalSingleStepSimulation( btScalar timeStep);
|
||||
|
||||
void synchronizeMotionStates();
|
||||
|
||||
void saveKinematicState(btScalar timeStep);
|
||||
virtual void saveKinematicState(btScalar timeStep);
|
||||
|
||||
void debugDrawSphere(btScalar radius, const btTransform& transform, const btVector3& color);
|
||||
|
||||
@ -90,7 +89,8 @@ public:
|
||||
///if maxSubSteps > 0, it will interpolate motion between fixedTimeStep's
|
||||
virtual int stepSimulation( btScalar timeStep,int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.));
|
||||
|
||||
|
||||
|
||||
virtual void synchronizeMotionStates();
|
||||
|
||||
void addConstraint(btTypedConstraint* constraint, bool disableCollisionsBetweenLinkedBodies=false);
|
||||
|
||||
|
@ -80,6 +80,8 @@ public:
|
||||
virtual void setGravity(const btVector3& gravity) = 0;
|
||||
virtual btVector3 getGravity () const = 0;
|
||||
|
||||
virtual void synchronizeMotionStates() = 0;
|
||||
|
||||
virtual void addRigidBody(btRigidBody* body) = 0;
|
||||
|
||||
virtual void removeRigidBody(btRigidBody* body) = 0;
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
|
||||
virtual void updateAabbs();
|
||||
|
||||
void synchronizeMotionStates();
|
||||
virtual void synchronizeMotionStates();
|
||||
|
||||
virtual void setConstraintSolver(btConstraintSolver* solver);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user