diff --git a/Demos/CMakeLists.txt b/Demos/CMakeLists.txt index a271c17c8..0b6040ba0 100644 --- a/Demos/CMakeLists.txt +++ b/Demos/CMakeLists.txt @@ -1,2 +1,2 @@ -SUBDIRS( OpenGL AllBulletDemos ConvexDecompositionDemo Benchmarks HelloWorld MultiThreadedDemo CcdPhysicsDemo ConstraintDemo GenericJointDemo RagdollDemo BasicDemo BspDemo MovingConcaveDemo VehicleDemo ColladaDemo UserCollisionAlgorithm CharacterDemo SoftBodyDemo ) +SUBDIRS( OpenGL AllBulletDemos ConvexDecompositionDemo Benchmarks HelloWorld MultiThreadedDemo CcdPhysicsDemo ConstraintDemo GenericJointDemo RagdollDemo BasicDemo BspDemo MovingConcaveDemo VehicleDemo ColladaDemo UserCollisionAlgorithm CharacterDemo SoftDemo ) diff --git a/Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp b/Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp index f29999c2a..d275a1d0f 100644 --- a/Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp +++ b/Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp @@ -20,7 +20,6 @@ subject to the following restrictions: //Note: some of those settings need 'DO_WALL' demo //#define USE_KINEMATIC_GROUND 1 //#define PRINT_CONTACT_STATISTICS 1 -//#define REGISTER_BOX_BOX 1 //needs to be used in combination with REGISTER_CUSTOM_COLLISION_ALGORITHM //#define USER_DEFINED_FRICTION_MODEL 1 //#define USE_CUSTOM_NEAR_CALLBACK 1 //#define CENTER_OF_MASS_SHIFT 1 @@ -29,16 +28,12 @@ subject to the following restrictions: //#define USE_PARALLEL_SOLVER 1 //experimental parallel solver //#define USE_PARALLEL_DISPATCHER 1 -//following define allows to compare/replace Bullet's constraint solver with ODE quickstep -//this define requires to either add the libquickstep library (win32, see msvc/8/libquickstep.vcproj) or manually add the files from Extras/quickstep +//from Bullet 2.68 onwards ODE Quickstep constraint solver is optional part of Bullet, re-distributed under the ZLib license with permission of Russell L. Smith //#define COMPARE_WITH_QUICKSTEP 1 #include "btBulletDynamicsCommon.h" #include "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h" -#ifdef REGISTER_BOX_BOX -#include "../Extras/AlternativeCollisionAlgorithms/BoxBoxCollisionAlgorithm.h" -#endif //REGISTER_BOX_BOX #include "BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h" #ifdef USE_PARALLEL_DISPATCHER @@ -60,9 +55,6 @@ subject to the following restrictions: #endif//USE_PARALLEL_DISPATCHER -#ifdef COMPARE_WITH_QUICKSTEP -#include "../Extras/quickstep/OdeConstraintSolver.h" -#endif //COMPARE_WITH_QUICKSTEP #include "LinearMath/btQuickprof.h" #include "LinearMath/btIDebugDraw.h" @@ -419,12 +411,9 @@ int maxNumOutstandingTasks = 4; // m_broadphase = new btSimpleBroadphase; //box-box is in Extras/AlternativeCollisionAlgorithms:it requires inclusion of those files -#ifdef REGISTER_BOX_BOX - m_dispatcher->registerCollisionCreateFunc(BOX_SHAPE_PROXYTYPE,BOX_SHAPE_PROXYTYPE,new BoxBoxCollisionAlgorithm::CreateFunc); -#endif //REGISTER_BOX_BOX #ifdef COMPARE_WITH_QUICKSTEP - m_solver = new OdeConstraintSolver(); + m_solver = new btOdeQuickstepConstraintSolver(); #else diff --git a/Demos/Jamfile b/Demos/Jamfile index 84b8eccf7..7a3929c8a 100644 --- a/Demos/Jamfile +++ b/Demos/Jamfile @@ -82,7 +82,7 @@ SubInclude TOP Demos ConcaveDemo ; SubInclude TOP Demos ConstraintDemo ; SubInclude TOP Demos RagdollDemo ; SubInclude TOP Demos GenericJointDemo ; -SubInclude TOP Demos SoftBodyDemo ; +SubInclude TOP Demos SoftDemo ; SubInclude TOP Demos ContinuousConvexCollision ; SubInclude TOP Demos GjkConvexCastDemo ; SubInclude TOP Demos Raytracer ; diff --git a/Demos/SoftDemo/Jamfile b/Demos/SoftDemo/Jamfile index ec446deca..3e765a81f 100644 --- a/Demos/SoftDemo/Jamfile +++ b/Demos/SoftDemo/Jamfile @@ -1,3 +1,3 @@ -SubDir TOP Demos SoftBodyDemo ; +SubDir TOP Demos SoftDemo ; BulletDemo SoftBodyDemo : [ Wildcard *.h *.cpp ] ; diff --git a/Demos/SoftDemo/SoftDemo.cpp b/Demos/SoftDemo/SoftDemo.cpp index 3d8234c69..bf3065c6b 100644 --- a/Demos/SoftDemo/SoftDemo.cpp +++ b/Demos/SoftDemo/SoftDemo.cpp @@ -23,8 +23,8 @@ subject to the following restrictions: #include "LinearMath/btQuickprof.h" #include "LinearMath/btIDebugDraw.h" #include "BMF_Api.h" -#include "demos\gimpacttestdemo\bunnymesh.h" -#include "demos\gimpacttestdemo\torusmesh.h" +#include "../GimpactTestDemo/BunnyMesh.h" +#include "../GimpactTestDemo/TorusMesh.h" #include //printf debugging static float gCollisionMargin = 0.05f/*0.05f*/; diff --git a/src/BulletDynamics/CMakeLists.txt b/src/BulletDynamics/CMakeLists.txt index a5d95e7f8..fc04f0636 100644 --- a/src/BulletDynamics/CMakeLists.txt +++ b/src/BulletDynamics/CMakeLists.txt @@ -24,6 +24,7 @@ ADD_LIBRARY(LibBulletDynamics ConstraintSolver/btOdeContactJoint.h ConstraintSolver/btOdeJoint.cpp ConstraintSolver/btOdeJoint.h + ConstraintSolver/btOdeSolverBody.h ConstraintSolver/btOdeQuickstepConstraintSolver.cpp ConstraintSolver/btOdeQuickstepConstraintSolver.h ConstraintSolver/btOdeTypedJoint.cpp @@ -43,4 +44,8 @@ ADD_LIBRARY(LibBulletDynamics Vehicle/btRaycastVehicle.h Vehicle/btWheelInfo.cpp Vehicle/btWheelInfo.h + btSoftBody.cpp + btSoftBody.h + btSoftBodyHelpers.cpp + btSparseSDF.h ) diff --git a/src/BulletDynamics/ConstraintSolver/btOdeSolverBody.cpp b/src/BulletDynamics/ConstraintSolver/btOdeSolverBody.cpp deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/BulletDynamics/Jamfile b/src/BulletDynamics/Jamfile index 10ea43b79..11f7ba7f5 100644 --- a/src/BulletDynamics/Jamfile +++ b/src/BulletDynamics/Jamfile @@ -3,6 +3,7 @@ SubDir TOP src BulletDynamics ; Description bulletdynamics : "Bullet Rigidbody Dynamics" ; Library bulletdynamics : [ Wildcard ConstraintSolver : *.h *.cpp ] + [ Wildcard SoftBody : *.h *.cpp ] [ Wildcard Dynamics : *.h *.cpp ] [ Wildcard Vehicle : *.h *.cpp ] ; diff --git a/src/BulletDynamics/SoftBody/btSparseSDF.h b/src/BulletDynamics/SoftBody/btSparseSDF.h index 91f0e4a20..c36067853 100644 --- a/src/BulletDynamics/SoftBody/btSparseSDF.h +++ b/src/BulletDynamics/SoftBody/btSparseSDF.h @@ -17,6 +17,9 @@ subject to the following restrictions: #ifndef _14F9D17F_EAE8_4aba_B41C_292DB2AA70F3_ #define _14F9D17F_EAE8_4aba_B41C_292DB2AA70F3_ +#include "BulletCollision/CollisionDispatch/btCollisionObject.h" +#include "BulletCollision/NarrowphaseCollision/btGjkEpa2.h" + template struct btSparseSdf { @@ -310,4 +313,4 @@ struct btSparseSdf } }; -#endif \ No newline at end of file +#endif