Commit Graph

31 Commits

Author SHA1 Message Date
donggas90
a3b41fdcb9 Simple Improve Array 2015-06-08 13:40:23 +09:00
erwin.coumans
73b217fb07 Apple contribution for OSX SSE and iOS NEON optimizations unit tests, thanks to Jordan Hubbard, Ian Ollmann and Hristo Hristov.
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.
2012-06-07 00:56:30 +00:00
erwin.coumans
76375afff2 revert quickSort change in commit http://code.google.com/p/bullet/source/detail?r=2527 and fix the underlying sort issue
in VoronoiFractureDemo (store intermediate values in memory to avoid problems)
@todo: rewrite the island management to avoid sort for better performance
Thanks to Peter Kyme for the report, fixes Issue 607
2012-03-14 03:52:29 +00:00
erwin.coumans
b5b31ce52b added VoronoiFractureDemo, thanks to RBD
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.
2012-03-05 21:47:05 +00:00
erwin.coumans
f754952232 Pass in a const reference to a CompareFunc for quickSort, to make Visual Studio 2011 happy.
Thanks to Cameron Hart
Fixes Issue 588
2012-01-23 21:39:44 +00:00
erwin.coumans
866dc2c6c7 operator argument had to be const 2011-11-22 00:21:48 +00:00
erwin.coumans
0e6926c096 avoid compile errors in projects (btHashMap copied gives errors, see http://gamekit.org/forum/viewtopic.php?f=9&t=29&start=93 2011-11-22 00:03:46 +00:00
erwin.coumans
4e0aa42123 Disallow the operator= for btAlignedObjectArray, together with some fixes in the code (to avoid accidental deep copy)
Enable #define BT_ALLOW_ARRAY_COPY_OPERATOR in Bullet/LinearMath/btAlignedObjectArray.h to re-enable it
Fixes Issue 564, thanks to Tissen Peter for the report/fix
2011-11-15 20:09:05 +00:00
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
cb497b88a6 Avoid division by zero in softbody constraint solving
Thanks majestik for reporting the issue and providing a patch, see Issue 469

Fix bug in findBinarySearch, luckily this method was not used yet.
Thanks snowcat for reporting a fix for this issue:
http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=6294
2011-01-30 21:17:18 +00:00
erwin.coumans
b3f081fc85 Added preparation for GPU hardware accelerated solvers for BulletSoftBody (OpenCL and DirectCompute backends will follow)
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
2010-07-16 23:26:25 +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
3edd806b88 Binary serialization in the .bullet file format (work-in-progress) 2009-12-08 18:02:37 +00:00
erwin.coumans
d9c4529a26 + bugfix in btAlignedObjectArray, not calling destructors on resize to smaller array.
Thanks Benoit for pointing this out, and bugfix: http://code.google.com/p/bullet/issues/detail?id=218

+ Added point to point, hinge, slider and generic 6dof constraints to Maya Dynamica plugin
Thanks to Herbert Law for the constribution: http://code.google.com/p/bullet/issues/detail?id=221
2009-05-06 19:55:05 +00:00
erwin.coumans
8acadeb711 minor tweaks to demos: enable constraint debug drawing in AllBulletDemos, default constraint debugging size set to 0.3,
set svn:eol-style native for folder files
http://code.google.com/p/bullet/issues/detail?id=191
2009-02-18 22:52:03 +00:00
erwin.coumans
65cdd7146f Use placement new for copy constructor of arrays. Thanks to M. Reuvers for the patch.
http://bulletphysics.com/Bullet/phpBB3/viewforum.php?f=9

Generally, however, it is best to avoid copying entire arrays, but use a 
reference.

typedef btAlignedObjectArray<btSomeClass> Array;

Array a;
Array b = a;//avoid this whenever possible

This is much better:
Array& b = a;//use a reference
const Array& b = a; //or const reference
2008-12-08 17:57:18 +00:00
erwin.coumans
7e93be739b add copy constructor for btAlignedObjectArray, to avoid crashes as reported by JamesH
http://bulletphysics.com/Bullet/phpBB3/viewtopic.php?p=11600#p11600
2008-11-30 16:47:36 +00:00
erwin.coumans
42ad559b2d Add some Doxygen comments for broadphase and linearmath classes. 2008-08-27 02:24:11 +00:00
erwin.coumans
65bb612598 - added quickSort to btAlignedObjectArray (has generally better performance then heapSort)
- replaced all usage of heapSort by quickSort
- finished btMultiSapBroadphase. Still some work to be done to increase performance (faster add/remove from child broadphases. 
  uses currently AABB tree to locate child broadphase (should use grid), and sorted array takes too much time.
2008-03-16 04:30:43 +00:00
ejcoumans
b054f375bc - Added serialization to btBvhTriangleMeshShape/btOptimizedBvh. See ConcaveDemo for example usage.
- added bt32BitAxisSweep3, which co-exists without recompilation, using template class. This broadphase is recommended for large worlds with many objects (> 16384), until btMultiSwap is finished.
- Fixed some recent issues in Bullet 2.57 related to compound (thanks Proctoid) and memory allocations
2007-09-10 01:14:42 +00:00
ejcoumans
c095927afb don't check twice, thanks Marten Svanfeldt
>>2. reserve(int) method check capacity() < _Count twice.
2007-06-19 23:45:10 +00:00
ejcoumans
769809e3a7 disabled memcpy by default, it seems to be opening a can of worms, some platforms/compilers have it defined in <memory.h>, others in <string.h> etc
also for placement new, include <new> rather then <memory.h>
Thanks Marten Svanfeldt for the help
2007-06-19 23:41:01 +00:00
ejcoumans
ca1c42f07f use <memory> for replacement new 2007-06-16 00:24:28 +00:00
ejcoumans
65d10d7b12 Fixes in aligned object array, to call copy constructor, and not the assignment operator, operator=
Also allows to use the array for classes with virtual methods.
2007-06-15 23:49:52 +00:00
ejcoumans
bc3f9535ad cleaned up, removed warning under MSVC2005 (Level 4)
Mostly related to alignment and unused variables
2007-04-13 01:37:21 +00:00
ejcoumans
853bafb7ae Get the open source Bullet library more in sync with Playstation SPU version 2007-04-10 01:02:58 +00:00
ejcoumans
151cd4b9da prepare and added constraint solver optimizations, not activated yet. 2007-03-17 00:09:12 +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
sjbaker
db573e4a59 Clean up about a bazillion compilation warnings. 2006-12-22 02:33:42 +00:00
ejcoumans
0710ca2e36 better safe then sorry: set m_data to zeto after deallocation. 2006-12-19 23:54:02 +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