Commit Graph

41 Commits

Author SHA1 Message Date
erwin.coumans
6173a30bce Improved BulletSoftBody serialization, added cluster support. Joints and copying data from GPU back to softbody are the main todo.
Updated the Bullet/Demos/SerializeDemo to load .bullet files with the softbody data.

BulletSoftBody should use getWorldTransform and not getInterpolationWorldTransform
Fix btBulletWorldImporter so that it creates a copy of the index/vertex data, this prevents crashes when deleting the .bullet file with triangle meshes.
2010-12-03 03:11:21 +00:00
erwin.coumans
032c6bfe2c add initial support for soft body / cloth serialization, and updated SerializeDemo to load soft bodies/cloth.
Serializes soft body nodes (vertices), links, faces, tetrahedra, materials, anchors with rigid bodies.
Some todo's are serialization of pose, constraints between soft bodies
2010-12-01 05:55:08 +00:00
erwin.coumans
d6cbc28b94 prettify the SoftDemo a little bit, and use 1024x768 for ForkLiftDemo and SoftDemo. 2010-09-22 23:02:47 +00:00
erwin.coumans
844a54a409 Fix broken CDTestFramework
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
2010-08-15 20:45:55 +00:00
erwin.coumans
81f04a4d48 fix: some file didn't have the svn:eol-style native yet 2010-03-06 15:23:36 +00:00
erwin.coumans
e57f03599a make Bullet compile on Visual Studio 6 2010-01-30 23:10:12 +00:00
erwin.coumans
788f48643b remove all warnings on Mac OSX Snow Leopard 2010-01-30 22:31:56 +00:00
erwin.coumans
2ef7c1a457 Fixes / improvements in soft body:
avoid blow-up due to improper mass calculation for fixed nodes (happened when using clusters)
allow to create collision clusters for each tetrahedron or triangle, when using btSoftBody::generateClusters(0)
tweak soft body demos a bit, only draw debug wireframe if necessary
2009-08-28 21:23:54 +00:00
erwin.coumans
f492899499 Added example of tetrahedral (volumetric) softbodies
Keep camera distance positive when using mouse zoom
Updated autogenerated msvc projectfiles
Added glut 64 bit support
2009-08-27 18:39:17 +00:00
erwin.coumans
34699f6de6 + add option to set pre-tick callback, called at the beginning of each internal simulation step
+ 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
2009-08-14 21:36:51 +00:00
erwin.coumans
40c73f327c + CMake build system fix under Windows: don't define _WINDOWS to allow Glut console demo to build properly
+ Allow user to enable useConvexConservativeDistanceUtil . Use dynamicsWorld->getDispatchInfo().m_useConvexConservativeDistanceUtil = true;
(see Demos/Benchmarks/Benchmark4 (convex objects falling down)
+ Fix for plane drawing (just wire-frame)
+ Gimpact: use collision margin of 0.07 for demo (because BULLET_TRIANGLE_COLLISION is used)
+ replace dot,cross,distance,angle,triple in btVector3 by btDot, btCross,btDistance,btAngle,btDistance to avoid naming conflicts
+ Some fixes in GJK penetration depth normal direction (broken in a previous commit)
+ fix in calculateDiffAxisAngleQuaternion to make ConvexConservativeDistanceUtil work properly
+ allow debug drawing to debug btContinuousConvexCollision
+ add comment/warning that btTriangleMesh::findOrAddVertex is an internal method, users should use addTriangle instead
2009-07-15 16:47:48 +00:00
erwin.coumans
dc4180f1ce + fix bug in SoftDemo: use removeRigidBody for rigid bodies, instead of removeCollisionObject
+ use default convex drawing instead of special cylinder drawing (caps are wrongly drawn)
+ allow camera translation using middle-mouse button in SoftDemo
+ add/removeCollisionObject virtual 
Thanks Ola for this suggestion
2009-07-06 04:15:02 +00:00
erwin.coumans
33029ad996 updated demos -> ALT + mouse uses Maya-style controls, replaced BMF_Fonts by GLDebugFont
fix debug drawing of btMultiSphereShape
added box2d demo
added experimental gpu 2d demo
2009-05-09 19:27:14 +00:00
erwin.coumans
dd21959709 Minor fixes to keep trunk compiling, while doing the refactoring. 2008-12-01 07:24:39 +00:00
erwin.coumans
82047e601e updated Bullet sequential impulse constraint solver, so it matches 100% ODE PGS quickstep solver innerloop, mainly by renaming variables... 2008-11-26 00:27:35 +00:00
erwin.coumans
3c0ca0d931 Fix btSoftBody issue, so it can interact with btCollisionObject and btGhostObject (and not just btRigidBody and btSoftBody)
Thank for the report mi076 http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2823

remove legacy.c from libxml
removed #include <math.h> from btQuadWord.h , it should be centralized in btScalar.h (to allow easier replacement with fastmath.h etc)
2008-11-10 20:33:14 +00:00
erwin.coumans
60ce828419 Autoformat selection for soft body, btDbvt related classes (no code change, just layout using Visual Studio) 2008-10-15 18:39:27 +00:00
erwin.coumans
cac172d422 Use consistent rayFrom/rayTo API for rayTest for btDbvt and btSoftBody, instead of rayCast/collideRAY(origin,direction). This means RayFromToCaster has a fraction [0..1] instead of distance [0..INF]
Renamed collideRay -> rayTest to reflect change to (rayFrom,rayTo) interface.
Re-use btRayAabb2 function from src/LinearMath/btAabbUtil2.h in btDbvt instead of duplicated implementation.
2008-10-15 18:30:35 +00:00
erwin.coumans
9c776c6ed0 some finishing touches for drawing shadows/clusters/textures. 2008-08-01 06:11:11 +00:00
erwin.coumans
23d9483ea9 use k/l to steer Bunny car (avoid keyboard conflicts) 2008-08-01 02:45:13 +00:00
erwin.coumans
3ca977e39f Patch by Nathanael Presson: (needs some more work, some of the demos don't show properly (RayCaster, CollisionInterfaceDemo,'g' key is already occupied in ConcaveDemo etc)
btDbvtBroadphase:
- Fixed a performance issues reported by 'reltham'
- Added btDbvtBroadphase::optimize() for people who want good performances right away or don't do dynamics.
- fixed compilation issues when DBVT_BP_PROFILE was set.

btSoftBody:
- Fixed singular matrix issues related to polar decomposition (flat meshes).

DemoApplication:
- Shadows (enable/disable through 'g' or DemoApplication::setShadows(bool)).
- Texture can be enable/disable through 'u'

CDFramework:
- fixed compilation issues.
2008-07-28 04:33:55 +00:00
erwin.coumans
d71f8d6623 Added several updates for btSoftBody: convex cluster collision detection, new constraints, new demos (only enabled in SoftBodyDemo, todo for AllBulletDemos) etc.
Thanks a lot to Nathanael Presson for this update.
2008-07-22 02:22:01 +00:00
erwin.coumans
d49aeb9dff + improved split impulse constraint solver option
+ improved friction warm starting
+ made constraint solver configuration more consistent (moved m_solverMode into btContactSolverInfo)
+ reset timing in CDTestFramework after initialization (SAP init destorts timings)
+ make it easier to change default sizes for stack allocator in btDefaultCollisionConfiguration
2008-05-29 03:33:32 +00:00
erwin.coumans
3a94e70370 don't enable concave mesh for soft body demos (work-in-progress) 2008-05-24 05:32:54 +00:00
erwin.coumans
f8e5481612 Added method to collect all persistent contact manifolds, given a btBroadphasePair (collision algorithm)
virtual	void	getAllContactManifolds(btManifoldArray&	manifoldArray)
See Demos/CharacterDemo/CharacterDemo.cpp for example usage of getAllContactManifolds
Added btDbvtBroadphase to btBulletCollisionCommon.h headerfile
Enable soft body vs concave (albeit slow)
Improved contact point debug rendering (moved from constraint solver into debugDrawWorld)
2008-05-24 04:23:00 +00:00
erwin.coumans
561066af75 + make compound versus soft body work (soft body uses interpolated transform)
+ fixed issue with persistent manifold, warmstarting values were not initialized properly
+ don't clear manifold in sphere-sphere collision (need warmstarting)
+ added support for 'split impulse', decouple positional error correction from velocity correction
This avoids adding momentum due to penetration correction, it can be tuned using following variables:
solverInfo.m_splitImpulse = true/false (disable/enable)
solverInfo.m_splitImpulsePenetrationThreshold (below this value, baumgarte/mixed velocity/penetration is used (cheaper, looks more plausible)
solverInfo.m_linearSlop (less jitter, when small amound of penetration is allowed)
2008-05-23 09:05:37 +00:00
erwin.coumans
e7aa93af36 added compount shape to soft body demo 2008-05-18 01:51:10 +00:00
erwin.coumans
d9e7058ff2 Softbody improvements, thanks to Nathanael 2008-05-17 12:39:16 +00:00
erwin.coumans
649709dc2d updated build files 2008-05-10 19:24:39 +00:00
erwin.coumans
25c5d0d57a +Added btDbvtBroadphase, this very fast/efficient broadphase is based on Dynamic AABB tree (btDbvt).
+SoftBody improvements by Nathanael Presson:
+Add tetrahedralization
+Add support for tearing/slicing cloth and deformable volumes. Uncomment the line in Bullet/src/BulletSoftBody/btSoftBodyHelpers.h: //#define	BT_SOFTBODY_USE_STL	1
2008-05-05 23:19:21 +00:00
erwin.coumans
7a7b46b448 fixed Soft Body compile issues on Mac OSX, added build files 2008-04-14 07:44:54 +00:00
erwin.coumans
be2490e4fb Final 2.68 from Nathanael Presson, mainly soft body related. Added raycast support for soft bodies (press comma-key in the soft body demos to toggle ray cast tests) 2008-04-14 06:24:56 +00:00
erwin.coumans
3df41a478d moved/updated projectfiles for new BulletSoftBody library 2008-04-11 18:56:49 +00:00
erwin.coumans
177287ae78 add user interface to select Soft Body demo 2008-04-11 01:50:02 +00:00
erwin.coumans
1139c06a4d more soft body preparations, moved some parts from Demo/SoftBody to src/BulletDynamics/SoftBody
moved Extras/ConvexHull/btConvexHull.* to src/LinearMath/btConvexHull.*
removed btCollisionObject::m_internalOwner, replaced it by m_internalType. This should not affect external API (it was clearly marked as internal)
2008-04-10 20:00:41 +00:00
erwin.coumans
ed3e909282 some more fixes for btSoftBody:
+ use btBroadphaseProxy::AllFilter to collide with static and dynamic rigidbodies in broadphase
+ enlarge aabb for softbody in broadphase, otherwise misses collisions (deformation is not updated in-time?)
2008-04-06 08:22:46 +00:00
erwin.coumans
b37a37a28e Added initial broadphase support for softbody versus softbody and softbody versus rigidbody (see btSoftSoftCollisionAlgorithm and btSoftRididCollisionAlgorithm)
Added 	SOFTBODY_SHAPE_PROXYTYPE.
Some refactoring for btSoftBody, needs more work.
2008-04-06 06:53:00 +00:00
erwin.coumans
a151ec1c73 fixed a few issues, removed dependency from BulletDynamics to Extras/ConvexHull 2008-03-31 01:09:41 +00:00
erwin.coumans
c7b526abfa adjusted demos to include SoftDemo into AllBulletDemos 2008-03-31 00:03:35 +00:00
erwin.coumans
726b9c2ac2 improved multi-platform support for SoftBodyDemo 2008-03-30 23:22:30 +00:00
erwin.coumans
d4698cb3d5 Added SoftBody demo, contribution by Nathanael Presson. Will integrate into Bullet broadphase.
Added very basic drawTriangle for btIDebugDraw, useful for basic softbody visualization.
Added btGjkEpa2, contribution by Nathanael Presson. Improved version of EPA penetration depth computation, more suitable for multi-core/SPU (less memory usage). Note: btGjkEpa2 is not enabled by default currently.
2008-03-30 23:08:06 +00:00