Commit Graph

47 Commits

Author SHA1 Message Date
Erwin Coumans
f104765c47 added some template to restore (syncMultiBody, syncContactManifolds) for single float and double precision, in 'pybullet.restoreState' 2017-12-31 11:19:29 -08:00
Giuseppe Barbieri
b81252fbc4 Update btVector3.h 2017-10-08 10:49:20 +02:00
Giuseppe Barbieri
8755f51bec Typo 2017-10-07 16:58:38 +02:00
Erwin Coumans
06b695e051 remove some warning ,see also Pull Request #302
bump up pybullet version
2017-09-14 08:08:24 -07:00
erwincoumans
72dd8285e8 fix 'safeNormalize' (probably should remove it)
Fix for Issue 953: cull degenerate triangles
https://github.com/bulletphysics/bullet3/issues/935
Thanks to Oleg Klimov for the report and reproduction case.
2017-01-30 18:12:09 -08:00
Erwin Coumans
6563c9c821 add btVector3::safeNorm to avoid/workaround certain clang/g++ issue or returning -INF
when taking sqrtf(0.0000000000000000000000000000000000000108333558)
2016-09-25 23:13:23 -07:00
Jack Andersen
991366a48f Fixed self-referencial bug in btVector3's setInterpolate3 2015-01-20 19:10:52 -10:00
erwin.coumans@gmail.com
13936eb9a5 use square epsilon in btVector3::fuzzyZero (length2) 2013-10-29 22:53:01 +00:00
erwin.coumans
1a2c3c0ee9 Added a Lemke MLCP solver, extracted from the MBSim project, and re-licensed under the zlib license
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
2013-10-26 18:45:25 +00:00
erwin.coumans
75260cd0d7 fix iOS compilation when the C++ Language Dialect is set to GNU++11 2013-10-22 19:13:24 +00:00
erwin.coumans
f02dd51597 Added a first version of a Featherstone multi body implementation.
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.
2013-10-01 22:50:31 +00:00
erwin.coumans
858c890c96 prettify the debug wireframe drawing of sphere, capsule, cylinder and cone
add an btAssert in normalize of btVector3 and 'normalized' always use 'normalize'
2013-09-17 02:01:14 +00:00
erwin.coumans
92eed617cd fix SSE issue with XCode 3 2013-05-14 12:38:06 +00:00
erwin.coumans
02a22f6329 Avoid using SSE in API when BT_USE_SSE_IN_API is not defined
Fixes Issue 683.
2012-12-20 22:09:59 +00:00
erwin.coumans
d54423f9c0 Fix compile error in Visual Studio 2005 build: only enable SSE/SIMD intrinsics for btVector3 for Visual Studio 2008 and higher 2012-12-07 18:16:04 +00:00
erwin.coumans
8be5172df5 fix issue in the recent SSE implementation of setInterpolate3
align class
2012-09-17 16:03:47 +00: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
852fa3ba30 add the BT_ prefix for all #ifdef guards, to avoid conflicts with developers own header defines.
Fixes Issue 497

//license header
#ifndef BT_RIGIDBODY_H
#define BT_RIGIDBODY_H
class btRigidBody
{
};
#endif //BT_RIGIDBODY_H
2011-04-01 17:14:52 +00:00
erwin.coumans
318e0d74dc Fix in btQuickprof that caused crash in ConcaveConvexcastDemo.cpp
Thanks to Roman Ponomarev for the report
Make btVector3::rotate const
Thanks to lepoussin, see Issue 428
CMakeLists.txt improvement: don't copy resources when INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES is set
CMakeLists.txt improvement: INSTALL_EXTRA_LIBS for ConvexDecomposition and GIMPACTUtils
Thanks to andrebra, see Issue 425
2010-09-18 00:24:50 +00:00
erwin.coumans
9bee6f6afd prepared some unit test for LinearMath 2010-07-24 01:16:42 +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
a9556d0fd5 use _WIN32 instead of WIN32 (_WIN32 is a compiler built-in)
add virtual destructor to bFile
2010-02-06 18:50:45 +00:00
erwin.coumans
e7ff71d99b add support for double precision and 64bit serialization (and compatibility between all versions)
fix some issue in serialization of nested array data
add some tesing files
2010-01-25 19:42:51 +00:00
erwin.coumans
5d8e6dc3f3 improved btTriangleMeshShape/btBvhTriangleMeshShape serialization 2010-01-24 16:48:14 +00:00
erwin.coumans
db25e21fde added isZero and fuzzyZero to btVector3
Thanks jazztickets for the report, see Issue 145
2009-12-21 23:13:11 +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
d67aa861f2 Add support for childshape index for btCompoundShape during ContactAddedCallback,
see example in Bullet/Demos/ConvexDecompositionDemo
Removed some warnings
2009-08-11 00:30:41 +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
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
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
bfa8ebfbd8 fixes to keep compiler and unix/libspe developers happy 2008-12-01 16:22:43 +00:00
erwin.coumans
e80feca36b Big work-in-progress refactoring of the constraint solver:
1) Add fast branchless SIMD support for constraint solver (Windows only until we get other contributions).
See resolveSingleConstraintRowGenericSIMD in Bullet/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp
resolveSingleConstraintRowGenericSIMD can be used for all constraints, including contact, point 2 point, hinge, generic etc.

2) During this refactoring, all constraints support the obsolete 'solveConstraintObsolete' while we add 'getInfo1' and 'getInfo2' support.
This interface is almost identical interface to Open Dynamics Engine, to make it easier to port Dantzig LCP solver.

3) Some minor refactoring to reduce huge constructor overhead in math classes.
2008-12-01 06:41:25 +00:00
erwin.coumans
aeb48644ee Some performance improvements and fixes related to btVector3 being aligned on SPU.
btQuantizedBvh has a version number, memory layout might be different now (due to aligned btVector3)
reorganized some data members of some classes, to reduce memory footprint
2008-10-29 02:45:16 +00:00
erwin.coumans
28e580c203 removed STL usage of Extras/ConvexBuilder and replaced by btAlignedObjectArray
fixed several warnings, thanks to sparkprime
added comments patch for linear math, thanks to Tully Foote
2008-10-28 18:52:46 +00:00
erwin.coumans
8827d5dbfb undo btQuadWord changes, added integration in parallel SpuSampleTask 2008-06-04 02:01:41 +00:00
erwin.coumans
5e3777ddd2 added sample task, for multi threading tests
added union vec_float4 m_Vec128; for btVector3 for SPU and PPU.
2008-06-03 21:24:34 +00:00
ejcoumans
287f11de01 more endianness swapping fun for BVH serialization. 2007-09-19 22:37:22 +00:00
ejcoumans
a7841c7775 rewrote vector/quadword storage, it was incompatible with gcc compiler (causing some run-time problems) 2007-09-11 20:40:55 +00:00
ejcoumans
ab33083a9c make visual studio 6 compile/run (doesn't support 'long long int', so replace by char* pointers... 2007-09-10 01:53:07 +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
ec22825e65 added parallel solver (work in progress) and made modifications to demo/constraints to allow for getting the type without using virtual functions (needed on CELL SPU processors) 2007-08-12 17:27:33 +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
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
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
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
eb23bb5c0c merged most of the changes from the branch into trunk, except for COLLADA, libxml and glut glitches.
Still need to verify to make sure no unwanted renaming is introduced.
2006-09-27 20:43:51 +00:00