Use statically linked freeglut, instead of dynamic glut for the obsolete Bullet 2.x demos
Add the 'reset' method to b3GpuDynamicsWorld, and use it in the BasicGpuDemo (pretty slow in debug mode, use release mode)
Don't crash in btCollisionWorld, if there is no collision dispatcher
contact force problems". The solver needs a lot of iterations, before the quality goes up (~ 1000)
Thanks to Gabor PUHR for the contribution!
Improved the btLemkeSolver.
Remove the sparse optimizations from the btMatrixX.h, replace it with explicit call to rowComputeNonZeroElements (only used in the btSolveProjectedGaussSeidel), it was likely slowing things down, without being useful.
Re-enable SIMD in the solver (was accidently disabled in Bullet 2.82 release)
with permission of the original author.
The Lemke implementation is not fully working yet:
1) we need to convert the lo-high LCP problem into a problem without the lo/high
2) we need to sort out the remaining instabilities, and report a failure if the max loopcount is reached etc.
We replaced the fmatvec library with our own LinearMath/btMatrixX.h, and STL std::vector with btAlignedObjectArray
Removed some warnings/potential issues: use fuzzyZero instead of isZero, and some warnings,
related to this issue 756
Apply patch for CMake config, see Issue 754 (Issue 753)
Fix a few issue with the MLCP solver: allow split impulse, and fix offset in friction dependencies
Added a PGS solver that uses the sparsity of the A matrix, just for testing (the equivalent sequential impulse solver is much faster, not having to allocate the big matrices)
Allow picking of btMultiBody, using a btMultiBodyPoint2Point constraint, with limited strength to avoid adding too much energy to the system (= blowup)
Add btMultiBodyJointMotor, it can be used in combination with joint limit (just add the joint limit after the motor, to avoid jitter)
The original version was written by Stephen Thompson.
I replaced Eigen math by Bullet LinearMath, and added a dedicated 6x6 matrix solver.
Also I integrated support for collisions/contact constraints between btMultiBody and btRigidBody, and de-activation support.
See Demos/FeatherstoneMultiBodyDemo/Win32FeatherstoneMultiBodyDemo.cpp for example usage.
There is currently only support for contact constraints for btMultiBody.
Next on the list will be adding support for joint limit constraint for btMultiBody.
The implementation is still experimental/untested, the quality will improve in upcoming Bullet releases.
So files created by the new double precision serialization of Bullet 2.82 cannot be read by old Bullet versions,
but double precision serialized file generated by older Bullet versions can be read by Bullet 2.82 or newer.
changes are backwards compatible (btBulletWorldImporter can load old .bullet files)
but not forwards compatible (constraints in new .bullet files are ignored/unrecognized by old Bullet SDK)
This commit is for Issue 734. Some more work needs to be done for btGImpactMeshShapeDoubleData and thus btStridingMeshInterfaceDoubleData and btMeshPartDoubleData
fix vehicle demo (heightfield is broken, when using very large scaling factor)
add btConeShape serialization, see Issue 725
add btGearConstraint get/set, see Issue 685 and Issue 671
Add speculative contact restitution, but disabled by default, not well tested (btDiscreteDynamicsWorld::setApplySpeculativeContactRestitution)
Add --with-double-precision option to premake build system
add compound shape support to BulletXmlWorldImporter and fix some compile issue under Debian (hopefully)
object picking change in the demos: create a ball-socket picking constraint when holding shift while mouse dragging, otherwise a fixed (6dof) constraint
add assert in constraint solver, when both objects have their inertia tensor rows set to zero
btPolyhedralContactClipping: add edge-edge contact point in findSeparatingAxis (similar to the default GJK case)
See http://www.youtube.com/watch?v=RV7sBAsKu4M and Bullet/Demos/RollingFrictionDemo
Fixes in FractureDemo (mouse picking constraint needs to be removed, otherwise constraint solver crashes/asserts)
Note that it can easily introduce instability at regular (60Hertz) simulation steps so it is generally best to not use the option.
If needed, use a very small internal step, such as 1000 Hertz (world->stepSimulation(dt,100,1./1000.f); or stepSimulation(1./1000.,0);
(make sure to merge islands based on those predictive contacts too, added some check in the solver)
This fixes Issue 356.
Use same solver settings for AllBulletDemos
Make sure to embed the setCcdSweptSphereRadius inside the actual collision shape (for shoot box)
This should improve 'ccd' handling when using world->getDispatchInfo().m_useContinuous = true;body->setCcdSquareMotionThreshold(...); body->setCcdSquareMotionThreshold(...)
shoot smaller boxes (test)
use yellow instead of orange for contact point normals
tweak default erp and erp2 values, now split impulse is on by default (need to check it)
Applied picking cloth patch. Fixes Issue 646. Thanks to Dongsoo.
Applied patch Softbody updateConstraints. Fixes Issue 503. Thanks to Dave Bruce Phillips and Dongsoo.
Fix various warnigns under Mac OSX.
warmstarting for contact points was broken, fix in btPersistentManifold
enable split impulse by default (at the cost of some performance)
add the option for zero-length friction (instead of recomputing friction directions using btPlaneSpace), use the solver mode flag SOLVER_ALLOW_ZERO_LENGTH_FRICTION_DIRECTIONS
precompute lateral friction directions (in btManifoldResult)
remove the mConstraintRow[3] from btManifoldPoint, it just took a lot of memory with no benefits: fixed it in btParallelConstraintSolver
Skip btGeneric6DofSpringConstraintData parts of the data that will be invalid in .bullet files version 280 or older
This fixes Issue 618, thanks to cyrfer for the report.
minor improvements in premake build (name library output so multiple Visual Studio installations don't conflict)
remove msvc folder
For OSX:
cd build
./premake_osx xcode4
for iOS:
cd build
./ios_build.sh
./ios_run.sh
Also integrated the branches/StackAllocation to make it easier to multi-thread collision detection in the near future. It avoids changing the btCollisionObject while performing collision detection.
As this is a large patch, some stuff might be temporarily broken, I'll keep an eye out on issues.
fix in infinite recursion in quickSort, exclude the pivot in each sub partition
disabled constraints don't merge simulation islands, and they don't disable collision between linked rigid bodies either.
If you need tunneling prevention, one option is to use the CCD motion clamping in btDiscreteDynamicsWorld. See also Bullet/Demos/CcdPhysicsDemo.
You can use an embedded sphere that prevents tunneling, using the following settings:
body->setCcdMotionThreshold(0.5);
body->setCcdSweptSphereRadius(0.9f);
Add a camera zoom setting for the demos, thanks to ejtttje, fixes Issue 543
use btConvexPolyhedron for debug rendering, if available
fixes in btConvexConvexAlgorithm for polyhedral contact clipping, if GJK separating normal is zero
don't shift vertices in btPolyhedralConvexShape
Avoid crash in BulletWorldImporter, ignoring 'invalid' constraints between two static bodies
Use a bitfield for btCollisionObject::CollisionObjectTypes (to allow custom types that are derived from build-in types such as btRigidBody)
Revert/improve softbody debug rendering
Create a separate library for MiniCL (a rudimentary OpenCL wrapper to run kernels on multi-core CPU using the default C++ compiler, using Win32 Threads or Posix)
tweak vectormath/vmInclude.h for PS3 platforms
fix warning in btKinematicCharacterController
Added assert to check for positive masses in btCompoundShape::calculatePrincipalAxisTransform, see Issue 399
Fixes for LLVM/GCC compilation issue in btSequentialImpulseConstraintSolver
(Untested) fix for Linux 64bit compilation Issue 409
when converting existing objects to convex hull or mesh
One more method added to set spring equilibrium point directly for btGeneric6DofSpringConstraint
Introduced generated unique id's, instead of the pointer address to avoid 64bit->32bit truncation issues
Use serializer->getUniquePointer instead of directly using a pointer
moved ChunkUtils::getNextBlock to bFile::getNextBlock.
Moved 'TEST_BACKWARD_FORWARD_COMPATIBILITY' to bDNA.cpp. Enable the define for further testing of .bullet format
Removed duplicate definitions and use the one in LinearMath/btSerialization.h
improve serialization based on feedback: make it easier to serialize a single object, or single shape, or single bvh.
Modified Bullet/Demos/ConcaveDemo to use btSerializer to serialize the btOptimizedBvh (or optionally the trimesh+bvh)
You can also serialize trimesh without BVH, use:
serializer->setSerializationFlags(BT_SERIALIZE_NO_BVH);// or BT_SERIALIZE_NO_TRIANGLEINFOMAP
move btTriangleInfoMap.h into its own header, into the BulletCollision/CollisionShapes folder
add btTriangleInfoMap pointer to btBvhTriangleMeshShape, so we don't need to use the 'userpointer' anymore
preparation for serialization of btTriangleInfoMap.
See also http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=4603&start=30
Serialization: remove obsolete autogenerated headers
Minor changes in btSequentialImpulseConstraintSolver: split methods to make it easier to derive from the class and add functionality.
Tweak the BenchmarkDemo a bit:
1) disable deactivation in graphical mode
2) add some settings that increase performance in the BenchmarkDemo2 (1000 stack) from 35ms to 15ms on this quad core (at the cost of a bit of quality)
updated serialization structures and header files (for new 'm_name' field, replacing user pointer)
fix issue with btGeneric6DofConstraint::setParam in headerfile
virtual void btTypedConstraint::setParam(int num, btScalar value, int axis = -1) = 0;
virtual btScalar btTypedConstraint::getParam(int num, int axis = -1) const = 0;
Parameter can be BT_CONSTRAINT_ERP,BT_CONSTRAINT_STOP_ERP,BT_CONSTRAINT_CFM,BT_CONSTRAINT_STOP_CFM
Axis is 0 .. 5, first 3 for linear degrees of freedom, last 3 for angular. If no axis is specified it will take the 'default' degree of freedom. For a btHingeConstraint this would be the hinge axis (5)
(no motor support or advanced settings yet)
added btStaticPlaneShape serialization
Added toggle in cmake for BenchmarksDemo to enable/disable graphics rendering
Constraints reworked - all of them could now work with one or two bodies
Modification of constraint frames and initial positions of rigid bodies
now allowed at start frame only
Plugin version is set to 2.76
move debugDrawWorld to btCollisionWorld.
improved CollisionInterfaceDemo, show how to perform a closest point query for objects that are not in the collision world.
removed a bit of garbage from the debug drawer
Turned on by default, use m_useOffsetForConstraintFrame = false to use old setup
Use "O" (capital 'o') button to toggle it in SliderConstraintDemo and ConstraintDemo
Total applied impulse copied back from btSolverConstraint to btTypedConstraint
manually add some missing files to msvc projectfiles for now
fix in box-box collision detector, preventing it to fail in some rare cases
remove redundant line in btHingeConstraint, thanks to teravus
fix mouse drag camera rotation issue (modulo 360 instead of 180)
Minor fixes (#ifndef SPU_COLLISION_OBJECT_WRAPPER_H block etc)
Only update 'setNumTasks' when necessary
Revert vectormath.h include (can't resolve conflicts with PS3 SDK, need additional #include path)
+ use real-time for soft body demo (using this pre-tick callback)
+ optimize the generation of bending constraints for the special case where the distance is 2
Make btTypedConstraint and btPersistentManifold both derive from btTypedObject to make SPU-side generic constraint solver easier.
Note: all build systems need to be updated: remove SpuVoronoiSimplexSolver.cpp, SpuGjkPairDetector.cpp, SpuEpaPenetrationDepthSolver.cpp, SpuGjkEpa2.cpp
Also comment-out some code for __SPU__ to reduce code size
Added btContactConstraint (only used on PS3 SPU right now, better to use btPersistentManifold directly for contact constraints)
Improved readblend utility library (see also usage in http://gamekit.googlecode.com with Irrlicht)
Fix for btConvexConvexAlgorithm, potential division by zero
Thanks linzner http://code.google.com/p/bullet/issues/detail?id=260
If user wants more accurate inertia tensor for multi-sphere shape, use btCompoundShape instead
(amd btCompoundShape::calculatePrincipalAxisTransform)
Thanks rcharlton for bringing this up.
Erwin
Force activation state of static objects to be ISLAND_SLEEPING, once they are added to the world
Add backwards compatibility option btDiscreteDynamicsWorld::setSynchronizeAllMotionStates, just in case only updating active objects broke someones code
Don't disable 3D box-box in box2ddemo
Thanks Ole for the report and suggested fix:
http://code.google.com/p/bullet/issues/detail?id=220&can=1&start=200
Applied Character/btKinematicCharacterController.cpp patch:
Thanks Thomas for the patch!
http://code.google.com/p/bullet/issues/detail?id=196#makechanges
- added a normalizedDirection member variable. This is
slightly more efficient than recalculating the normalized
direction every simulation step.
- I overloaded the m_walkDirection member variable to hold
either the walkDirection or the Velocity, and used a boolean
flag to determine which behavior was required.
- The normalization behavior seemed custom, and I needed it
twice, so I moved it to a static helper method.
- I added the setVelocityForTimeInterval() method to the
base interface class. This to me is the scariest change
since people inheriting from it will need to make changes
(if only to add an empty function).
+ applied patch to mix double/single precision meshes independent from double/single precision Bullet build
Thanks to Ole for the patch, http://code.google.com/p/bullet/issues/detail?id=213
+ re-enable warming starting in constraint solver, it was disabled by accident
+ fix btConvexHullShape constructor, so accept vertices with non-16-byte striding
Thanks Shawn Baird for report and fix: http://code.google.com/p/bullet/issues/detail?id=204
For example, to only allow linear motion in the X-Z plane, and only rotation around Y axis use:
body->setLinearFactor(btVector3(1,0,1));
body->setAngularFactor(btVector3(0,1,0));
Fix build issues with CodeBlocks, when generating projectfiles using CMake 2.6:
${OPENGL_glU_LIBRARY} should be ${OPENGL_glu_LIBRARY}
Fix build issue with CodeBlocks, comment out xmlfree in Extras/COLLADA_DOM/src/modules/LIBXMLPlugin/daeLIBXMLPlugin.cpp (will leak memory)
btRaycastVehicle and btKinematicCharacterController are derived from btActionInterface now.
Some cosmetic cleanup: changed sourceforce/sf.net url to bulletphysics.com.
Added optional flag btSoftBody::appendAnchor( int node,btRigidBody* body, bool disableCollisionBetweenLinkedBodies=false), to disable collision between soft body and rigid body, when pinned
Added btCollisionObject::setAnisotropicFriction, to scale friction in x,y,z direction.
Added btCollisionObject::setContactProcessingThreshold(float threshold), to avoid collision resolution of contact above a certain distance.
Avoid collisions between static objects (causes the CharacterDemo to assert, when a dynamic object hits character)
Usage: set RayResultCallback.m_flags to kF_FilterBackfaces, optionally combined with kF_KeepUnflippedNormal.
Thanks Andy O'Neil for the patch!
Remove the force_inline for some internal constraint solver methods, it makes re-use easier.
Workaround/avoid MSVC 2005 compiler error in LibXML/trionan.c
Revert definition for ATTRIBUTE_ALIGNED16, and try to force sizeof(btSolverConstraint) by using unions with btScalar, for non-btScalar data types.
Use btAssert and not assert.
Don't access btAlignedObjectArray elements, for zero sets