Commit Graph

107 Commits

Author SHA1 Message Date
erwin.coumans
b80e5fd167 Remove co-planar faces from convex hull, using 2d Graham scan
Improve SAT performance, by skipping back-facing features
Add assert in array class (probably fires in places)
2011-05-20 12:29:24 +00:00
erwin.coumans
cdddf9d25a add FractureDemo to AllBulletDemos
improvements in CCD handling
some cleanup of CcdPhysicsDemo and BasicDemo
2011-04-09 01:14:21 +00:00
erwin.coumans
b16b61d9d6 disable constraints when they exceed a breaking threshold, control it with new methods in btTypedConstraint: get/setBreakingImpulseThreshold and get/setEnabled
Disabled constraints are not removed from the world and they use negligible CPU cycles
2011-04-02 19:01:23 +00:00
erwin.coumans
b67da9e50a made BasicDemo/Speculative Contacts demo a bit prettier 2011-03-05 21:13:49 +00:00
erwin.coumans
4e8596eef5 Added some helper methods for constraints and btMatrix3x3,
Thanks to  francois, See Issue 466

Prevent crash in SoftBodyDemo, when picking constraints and demo-mode switches to next demo.
2011-02-27 03:28:53 +00:00
erwin.coumans
4eddfce03e remove some warnings 2010-07-20 23:37:11 +00:00
erwin.coumans
fbc17731ec Several changes to sync Bullet trunk with PlayStation 3 spubullet version
Still needs some cross-platform fixes
2010-07-08 17:02:38 +00:00
erwin.coumans
498da0721b Move some code from Branches/OpenCL to trunk, related to threading and OpenCL:
Added Demos/ThreadingDemo showing how to use the cross-platform btThreadSupportInterface under Windows.
Added Demos/ParticlesOpenCL showing how to run the NVidia particle demo under OpenCL implementations by AMD, NVidia and MiniCL (CPU)
2010-06-24 22:54:00 +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
40dc18f604 remove Extras/obsolete/quickstep
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
2010-02-25 20:12:40 +00:00
erwin.coumans
e156967762 Enable graphical benchmark by default in cmake
Toggle between point to point and generic 6dof constraint for mouse picking in the demos

Use a 'equal vertex thresdhold' in the btVoronoiSimplexSolver of  0.0001f by default.
This can be disabled (or configured) using defaultCollisionConfiguration->getSimplexSolver()->setEqualVertexThreshold(0.f);
See http://code.google.com/p/bullet/issues/detail?id=305
2010-02-24 01:28:23 +00:00
erwin.coumans
729a883b71 attempt to let Maya plugin build under Linux using cmake
Thanks redpawfx for the feedback, see http://code.google.com/p/bullet/issues/detail?id=221

improvements in cmake (disable this incremental linking)
2010-02-16 04:30:53 +00:00
erwin.coumans
d4c3633405 Get rid of btSolverBody and use btRigidBody directly. btSolverBody didn't improve performance after all, due to random-access
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)
2010-02-11 20:30:56 +00:00
erwin.coumans
788f48643b remove all warnings on Mac OSX Snow Leopard 2010-01-30 22:31:56 +00:00
erwin.coumans
485d1a338e fix btCompoundShaps serialization of child shapes
added ConcaveDemo to cmake
added LinearMath/btSerializer.h to btBulletCollisionCommon.h
2010-01-27 23:37:46 +00:00
erwin.coumans
099c36a71e Add a new flag btCollisionObject::CF_DISABLE_VISUALIZE_OBJECT to give control over what objects are drawn using the debug drawer
This solves Issue 238 , thanks to  Linzner for the suggestion
Remove some warnings from GL_DialogDynamicsWorld.
2010-01-20 19:38:04 +00:00
erwin.coumans
8da244b443 remove a few warnings in DemoApplication 2010-01-19 23:29:19 +00:00
erwin.coumans
703582f4fa apply fix for btAcosf/btAsinf (numerical issue causes values of X become slightly larger than 1 or smaller than -1, causing NaNs)
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)
2009-10-09 23:35:00 +00:00
erwin.coumans
2f4f468f4d Created basic physics-based OpenGL menu dialog system, with toggle/text and slider control. 2009-09-26 01:44:09 +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
c4ad354ac0 More GJK degeneracy fixes, thanks Jacob Langford for the feedback:
http://code.google.com/p/bullet/issues/detail?id=250

Added missing files for Maya Dynamica plugin
Thanks Herbert Law for the patch, and damrit and others for the report
http://code.google.com/p/bullet/issues/detail?id=231

Fix btQuaternion shortestArcQuat, thanks Stan Melax for original fix and shogun for reminder
http://bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1989

Implemented btDiscreteDynamicsWorld::removeCollisionObject (and btSoftBodyDynamicsWorld) to avoid
crashes. Thanks Jacob Langford for bringing that up.

Minor sphere-debug drawing issue (spheres were drawn inside-out (wrong face winding)
2009-07-13 21:48:19 +00:00
erwin.coumans
badf723257 Replace all hardcoded 1e30(f) by BT_LARGE_FLOAT, defined in btScalar.h as 1e18(f) so that its square still fits in FLT_MAX
Thanks to Ole K. for reporting! http://code.google.com/p/bullet/issues/detail?id=206
2009-05-23 02:15:54 +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
77fac5e2ae revert accidently committed tweaks in demos 2009-03-23 03:36:03 +00:00
erwin.coumans
700db838b1 Add 1D and 2D support for Bullet: using rigidbody->angularFactor(const btVector3& factor) and body->setLinearFactor(const btVector3& linearFactor);
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)
2009-03-08 04:14:17 +00:00
erwin.coumans
d886c06fa5 Add the option for the btSimulationIslandManager to avoid splitting islands (for constraint solving)
Move the convertContact inside constraint solver to its own method
2009-02-13 02:34:46 +00:00
erwin.coumans
5698d6aed1 reset randseed in constraint solver for determinism
use BT_USE_SSE in btDbvt, defined in btScalar.h
2009-02-11 05:44:48 +00:00
erwin.coumans
7a2a98078a Fixes for broadphase/paircache determinism.
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
2009-02-10 23:50:21 +00:00
john.mccutchan
be3260280a Fix for issue #192
Also: Avoid divide by zero before OpenGL window is up
2009-02-10 22:10:21 +00:00
erwin.coumans
2a10a61f50 Some work-in-progress on making btDbvtBroadphase deterministic. When using the btSortedOverlappingPairCache, it seems deterministic now. todo: when using btHashedOverlappingPairCache. 2009-02-10 03:50:58 +00:00
erwin.coumans
98436a85c3 Fix issues with btSortedOverlappingPairCache, both for btAxisSweep3 and btDbvtBroadphase. 2009-02-09 22:57:52 +00:00
rponom
4bcd016c98 Constraint demo has been changed - debug visualization turned on by default 2009-01-16 03:06:28 +00:00
john.mccutchan
a8ec916af0 Added Height Field Fluid Demo to Bullet. All code stored in the Demos/HeightFieldFluidDemo directory for now.
Please see HfFluidDemo.cpp for examples of how to use the height field fluid along with buoyant collision shapes.

The implementation is still lacking in my ways:
1) Need to complete more collision algorithms for buoyant collision shapes
2) Support compound buoyant shapes
3) The buoyancy model isn't that great
4) Fluid volume can be lost over time
2009-01-08 22:53:23 +00:00
erwin.coumans
a064fd2052 Use the opposite constraint axis inside the constraint solver for the second object (-normal).
This makes it easier to port existing constraints and makes it 100% compatible with ODE quickstep constraint layout (getInfo2)
2008-12-03 04:52:23 +00:00
erwin.coumans
5383ed4930 + need to reset rigid body using 'setCenterOfMassTransform' to reset world inertia tensor
+ fixes in compound algorithm -> recompute contact points
+ add debug drawing to some demos.
+ revert btJacobianEntry change
+ replace dCROSSMAT by btVector3::getSkewSymmetricMatrix
2008-12-02 04:01:56 +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
9f28b2bc12 Improve damping formula in btRigidBody::applyDamping
Thanks to sparkprime, see http://code.google.com/p/bullet/issues/detail?id=74
Fixed btCompoundShape/btCapsuleShape/btGImpactShape for missing m_shapeType, and added an assert in DemoApplication::localCreateRigidBody for invalid shape types.
2008-09-30 00:34:58 +00:00
erwin.coumans
58e1e9f049 updated version to 2.72, fix a compilation issue. 2008-09-12 00:59:16 +00:00
erwin.coumans
569946a96f added some debugging variable for CCD motion clamping 2008-09-11 18:44:30 +00:00
erwin.coumans
93d1d24234 Some changes in rendering, to get shadows for trimeshes
Add dynamic aabb tree (btDbvt) optimization for btCompoundShape/btCompoundCollisionAlgorithm
Add btTransformAabb util, todo: deploy it throughout the codebase
2008-09-10 05:20:04 +00:00
erwin.coumans
359c84d3b3 Fix previous commit, accidently removed some aabbMin/aabbMax assignments.
move margin calculation for aabb before basis transform.
2008-09-05 00:26:02 +00:00
erwin.coumans
d8a5bf2c9c Calculation of bounding box: margins should be added before basis transform.
Disable btSphereBoxCollisionAlgorithm, it is broken.
More fixes for btSimpleBroadphase
Moved quickstep to Extras/quickstep folder, so developers don't get confused which constraint solver is default.
2008-09-04 22:53:24 +00:00
erwin.coumans
4894f24c9a Fixes for FPU exceptions, thanks to Phil Knight for reporting and John McCutchan for fix/workarounds.
Added new cluster collision methods for soft bodies, thanks to Nathanael Presson.
Enable/disable textures/shadows for specific demos.
2008-08-01 01:04:45 +00:00
erwin.coumans
af4520801b + Fix btSubsimplexConvexCast
Thanks to Nacho, http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2422)
Fix in rendering, GL_STENCIL
+ btTriangleIndexVertexArray indices should be unsigned int/unsigned short int,
+ Made InternalProcessAllTriangles virtual, thanks to 
Both thank to Fullmetalcoder, http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2401
+clamp impulse for btPoint2PointConstraint
Thanks to Martijn Reuvers, http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2418
+ Free memory of bvh, pass in scaling factor (optional)
Thanks to Roy Eltham, http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2375
2008-07-31 19:44:28 +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
b66e5350d0 rename HasHit method to hasHit
rename AddSingleResult to addSingleResult
moved collision filtering for btCollisionWorld::rayTest and btCollisionWorld::convexSweepTest from argument to the callback needsCollision
2008-07-09 23:30:21 +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
f9b22b36aa add aspect ratio in glFrustum/ray picking 2008-04-07 05:03:40 +00:00
ejcoumans
eeb78b8d45 free memory for btShapeHulls, keep track of it in GL_ShapeDrawer.
move btShapeHull and btConvexHull into its own library in Extras/ConvexHull (it allocates memory using mem/delete and refactoring into using btAlignedAlloc/Free takes too much time)
fix heightfield / btOptimizedBvh for quantization, so that raycast can use quantized aabb (clamp up for maxima and down for minima)

work-in-progress (update projectfiles etc)
2008-02-13 07:14:19 +00:00