Commit Graph

2337 Commits

Author SHA1 Message Date
ejcoumans
c1a54d9edc Attempts to improve performance. Not much gain yet, but good to experiment what has effect and what hasn't.
Added 'DO_BENCHMARK_PYRAMID' to CcdPhysicsDemo.
2007-03-20 20:12:23 +00:00
ejcoumans
f8fe7e8f2d renamed solverbody, more work will be committed soon, please stay tuned. 2007-03-20 06:15:12 +00:00
ejcoumans
3835e5296b 2007-03-20 06:14:43 +00:00
ejcoumans
f199cd1347 make visual studio 6 compile again 2007-03-20 05:06:01 +00:00
sjbaker
6b102c65b3 Cleanup some trivial compilation warnings. 2007-03-19 04:27:59 +00:00
ejcoumans
b8ce13adb1 bugfix, also convert rigidbody into solverbodies for constraints (without contact manifolds), and do additional check for validity 2007-03-17 08:29:05 +00:00
ejcoumans
2b87104184 more solver optimizations, can be disabled using solver->setSolverMode(SOLVER_RANDMIZE_ORDER) 2007-03-17 07:59:27 +00:00
ejcoumans
151cd4b9da prepare and added constraint solver optimizations, not activated yet. 2007-03-17 00:09:12 +00:00
ejcoumans
ea97ed3e30 fix in template usage, error only reported on Sun Solaris ?!?
Thanks Noerghel for reporting!
2007-03-13 15:21:01 +00:00
ejcoumans
0a5b19864e allow to use compression on btTriangleMesh 2007-03-12 23:19:02 +00:00
ejcoumans
b2351c84f3 optional define for 32bit handles in Broadphase, which allows number of objects to exceed 32767 2007-03-12 20:14:29 +00:00
ejcoumans
02e5f2dd8e void btDiscreteDynamicsWorld::solveConstraints(btContactSolverInfo& solverInfo)
sortedConstraints.heapSort(btAlignedObjectArray<btTypedConstraint*>::less());

should be

sortedConstraints.heapSort(btSortConstraintOnIslandPredicate);
Thanks  	Clemens Unterkofler for pointing this out!
2007-03-08 01:59:04 +00:00
ejcoumans
1655fbc2c0 fixed some windows related defines, and made btClock optional (behind #define) 2007-03-07 00:33:11 +00:00
ejcoumans
57883344df removed testing assert(0) 2007-03-07 00:22:40 +00:00
ejcoumans
adfdea5ca6 replaced #include "new.h" to #include <new> 2007-03-06 23:40:06 +00:00
sjbaker
3c1ba0023b NULL is not yet defined because this header is sometimes included before stdio.h or stddef.h - rather than change a bazillion places where the header is included, I'll just use 0 instead. 2007-03-06 18:14:37 +00:00
sjbaker
a4a3474fb5 The macro 'btFullAssert' is used like this:
btFullAssert ( yadda_yadda ) ;

...in the btScalar.h header, it's defined as:

    #define btFullAssert

...which means that the statement above becomes:

    ( yadda_yadda ) ;

...which means that code may actually be compiled and executed (unnecessarily) - and even when the code is something simple like:

    ( i > 0 && i < 3 ) ;

...the GCC tosses out a 'statement with no effect' warning - before
it optimises away the code.

The fix is:

   #define btFullAssert(x)

...so that the macro still takes a parameter which is now removed
from the sources so you get:

    ;

...which is guaranteed not to generate code.
2007-03-06 18:06:28 +00:00
ejcoumans
8fd8a85eee fixed memory leak, thanks AshMcConnell for reporting!
http://continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1009
2007-03-06 16:44:22 +00:00
ejcoumans
054d672592 - removed STL from the Bullet library: replace std::vector by btAlignedObjectArray. Also removed the std::set for overlapping pair set, and turned it into an overlapping pair array. The SAP only adds objects, never removed. Removal is postponed for during traversal of overlapping pairs (duplicates and non-overlapping pairs are removed during that traversal).
- added heap sort and binary search/linear search to btAlignedObjectArray
- fixed wrong cast, thanks Hamstray, http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1015
2007-03-06 09:59:17 +00:00
ejcoumans
b73900bc60 Improved performance of convex collision shapes, cache local AABB instead of recomputation. This fixes issue with very slow performance in larger .bsp levels.
Moved some asserts into 'btFullAssert', which is disabled by default (see btScalar.h to enable them). This is to speed-up debugging.
2007-02-26 04:59:05 +00:00
ejcoumans
e610598d33 - Added compressed/quantized AABB tree, 16 bytes per node, while supporting 32-bit (triangle) indices. Should be faster and smaller then original version (quantized aabb check is done in integer space)
Original aabb nodes are 44 bytes (with full floating point precision and additional part index)
- added meter-unit scaling support in ColladaConverter.cpp
2007-02-25 06:11:23 +00:00
ejcoumans
34c979bd02 double precision mode uses double precision epsilons/maximum (DBL_EPSILON instead of FLT_EPSILON) 2007-02-14 04:12:32 +00:00
ejcoumans
42278e58dd fixes to add improved double-precision for raycasts 2007-02-14 04:10:55 +00:00
ejcoumans
9b94416d61 allow single raycast to be performed on objects 2007-02-14 04:09:17 +00:00
ejcoumans
4d6ec84630 always update position, even for sleeping objects (is workaround, because sleeping objects never get their motionstate update), needs fixing for optimization 2007-02-14 04:02:14 +00:00
ejcoumans
bf68a742cc by default, disable warmstarting, enable random ordering,
user can override this using solver->setSolverMode(...)
2007-02-13 16:14:55 +00:00
ejcoumans
581468ceec Added btCapsuleShape. This could already be simulated by simply adding 2 spheres to the btMultiSphereShape, but this was bad documented/unknown.
For tapered capsules, you can still use btMultiSphereShape, just pass 2 spheres with different radius.
2007-01-30 00:09:08 +00:00
sjbaker
b924cb57d3 Fixed wheels so they rotate in the correct direction. 2007-01-07 05:41:50 +00:00
ejcoumans
ca973e9322 Fixed AABB tree building, which failed for certain large triangle meshes due to stack overflow.
Now it has a safer check for unbalanced tree, and forces them to be balanced.
2007-01-04 22:31:31 +00:00
ejcoumans
5929b2b79d fixed jam 'install' to properly copy right headerfiles in the destination directory 2006-12-26 17:16:40 +00:00
sjbaker
e9b21e21a6 Pathnames between #include files that are intended to be used within application code should not depend on the paths to the subdirectories being known to the compiler because this will not always be the case when an end-user includes your headers.
Includes of files in the local hierarchy must not use <...> please stick with "..."
2006-12-26 15:33:28 +00:00
sjbaker
208bbe7594 Added a set of empty, classless 'extern "C"' probe functions to allow '.so' loaders and application domain 'autotools' to easily and unambiguously check for the correct installation of the various bullet libraries.
eg:

  bulletmath_suffix="-lbulletmath"
  bulletcollision_suffix="-lbulletcollision"
  bulletdynamics_suffix="-lbulletdynamics"
  dnl Check bulletmath library
  AC_CHECK_LIB(bulletmath, btBulletMathProbe, true,
  AC_MSG_ERROR([there seems to be a problem with the bulletmath library]))
  LIBS="$bulletmath_suffix $LIBS"
  dnl Check bulletcollision library
  AC_CHECK_LIB(bulletcollision, btBulletCollisionProbe, true,
  AC_MSG_ERROR([there seems to be a problem with the bulletcollision library]))
  LIBS="$bulletcollision_suffix $LIBS"
  dnl Check bulletdynamics library
  AC_CHECK_LIB(bulletdynamics, btBulletDynamicsProbe, true,
  AC_MSG_ERROR([there seems to be a problem with the bulletdynamics library]))
  LIBS="$bulletdynamics_suffix $LIBS"
2006-12-26 00:39:32 +00:00
ejcoumans
24691e8eb8 reverted jam buildsystem, until changed for make is working,
minor fix in island processing
2006-12-25 20:39:39 +00:00
sjbaker
db573e4a59 Clean up about a bazillion compilation warnings. 2006-12-22 02:33:42 +00:00
ejcoumans
48c6917387 don't assert on bad input, just export the warning (todo add proper user-feedback for asserts/warning!) 2006-12-20 21:23:26 +00:00
ejcoumans
0710ca2e36 better safe then sorry: set m_data to zeto after deallocation. 2006-12-19 23:54:02 +00:00
ejcoumans
df9230327c Contribution to add optional double precision floating point support. Define BT_USE_DOUBLE_PRECISION for all involved libraries/apps. 2006-12-16 05:51:30 +00:00
ejcoumans
13b637f1ce updated build configuration to include make, next to jam. So ./configure will create Makefile AND Jamefile. 2006-12-15 18:24:31 +00:00
ejcoumans
df0c044228 removed obsolete code, added #ifdef to allow skipping of default registration of collision algorithm (avoid linking of unneeded code) 2006-12-13 22:44:20 +00:00
ejcoumans
6dff5a218e process contact and non-contact constraints inside the same iteration loop
added first draft for hingeConstraint motor
2006-12-12 03:15:11 +00:00
ejcoumans
2db98be0f7 added sourcefile to cmake 2006-12-06 04:56:26 +00:00
ejcoumans
5a5ba572a7 multi-platform issues with allocator 2006-12-06 04:51:13 +00:00
ejcoumans
bf591b44ec Replaced most STL std::vector with btAlignedObjectArray.
Same interface but less features (push_back, pop_back, clear, size, [] etc).
To prepare for SIMD/SSE code: Added 		#define ATTRIBUTE_ALIGNED16(a) __declspec(align(16)) a
2006-12-06 04:22:36 +00:00
ejcoumans
b6d1b4c94e Added btNearCallback. This is similar to Open Dynamics Engine (ODE) dNearCallback, but important differences:
- contact points are persistent (lifetime more then one frame, for warmstarting/incremental contact point management)
- continuous collision detection, time of impact
Added btRigidBody::isInWorld(), returns true if btRigidBody is inside a btCollisionWorld/btDynamicsWorld derived class
Added angularFactor to btRigidbody, this helps some character control (no angular impulse applied)
2006-12-04 15:42:03 +00:00
ejcoumans
2f557b2a4d Added btStackAlloc to Bullet (right now only used by btGjkEpa) 2006-11-29 02:27:27 +00:00
ejcoumans
71145de242 renamed ConcaveShape to btConcaveShape
added btHeightfieldTerrainShape (not done yet)
2006-11-29 02:11:25 +00:00
ejcoumans
6738ed329d ASSERT -> btAssert
Added btStackAlloc to Bullet (right now only used by btGjkEpa)
removed default constructors of btCollisionWorld/btDiscreteDynamicsWorld, to reduce link-time dependencies
2006-11-29 01:52:09 +00:00
ejcoumans
43ab3c67c4 compiler issue with GCC 3.3.5 2006-11-23 06:27:32 +00:00
ejcoumans
7dc6aa215a some more fixes to get msvc6 happy, and constraint solver: make non-randomizing solver default 2006-11-23 02:57:38 +00:00
ejcoumans
633bb02daa fix to get msvc 6 to compile, related to 'Allocate' template 2006-11-22 19:41:25 +00:00