Commit Graph

24 Commits

Author SHA1 Message Date
erwin.coumans
1aac33f6b6 refactor constraint serialization, so that double precision is maintained,
changes are backwards compatible (btBulletWorldImporter can load old .bullet files)
but not forwards compatible (constraints in new .bullet files are ignored/unrecognized by old Bullet SDK)
This commit is for Issue 734. Some more work needs to be done for btGImpactMeshShapeDoubleData and thus btStridingMeshInterfaceDoubleData and btMeshPartDoubleData
2013-09-14 06:08:50 +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
f17fa297d5 wrapped up first version of the FractureDemo
move 'split impulse' / position solver before velocity solver, so that applied impulse is available for fracture
add btSliderConstraint::getAngularPos see http://code.google.com/p/bullet/issues/detail?id=489
2011-03-18 00:20:52 +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
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
04b7a7fff4 remove dead btSliderConstraint code 2010-02-05 01:51:57 +00:00
rponom
af1dafc659 Fix for the slider constraint (case when useLinearReferenceFrameA == false) 2010-02-04 01:21:45 +00:00
erwin.coumans
1cd52f3d11 Removed empty constructors for constraints, I don't recall why we added them (possibly SPU) but if we really need them we have to revert this.
Moved static fixed body into a static function 'getFixedBody' to avoid issues when embedding Bullet in C#/CLI managed code.
2010-02-03 23:02:33 +00:00
erwin.coumans
d58081ce37 Provide easier access to CFM and ERP (and Stop ERP/Stop CFM) for constraints in a similar way to Open Dynamics Engine
virtual	void	btTypedConstraint::setParam(int num, btScalar value, int axis = -1) = 0;
virtual	btScalar btTypedConstraint::getParam(int num, int axis = -1) const = 0;
	
Parameter can be BT_CONSTRAINT_ERP,BT_CONSTRAINT_STOP_ERP,BT_CONSTRAINT_CFM,BT_CONSTRAINT_STOP_CFM
Axis is 0 .. 5, first 3 for linear degrees of freedom, last 3 for angular. If no axis is specified it will take the 'default' degree of freedom. For a btHingeConstraint this would be the hinge axis (5)
2010-02-03 22:16:09 +00:00
erwin.coumans
725411a1f3 added a warning to all serialization structures:
///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
2010-01-27 02:41:38 +00:00
erwin.coumans
00f58e5a91 added basic serialization for several constraints including btPoint2PointConstraint, btHingeConstraint, btSliderConstraint, btConeTwistConstraint, btGeneric6DofConstraint
(no motor support or advanced settings yet)
added btStaticPlaneShape serialization
Added toggle in cmake for BenchmarksDemo to enable/disable graphics rendering
2010-01-27 02:13:56 +00:00
rponom
f919baf03d Improved Slider, Hinge and Generic6DOF constraint setup.
Turned on by default, use m_useOffsetForConstraintFrame = false to use old setup
Use "O" (capital 'o') button to toggle it in SliderConstraintDemo and ConstraintDemo

Total applied impulse copied back from btSolverConstraint to btTypedConstraint
2009-11-25 23:52:12 +00:00
erwin.coumans
3e2529fcb5 Minor constraint refactoring, to allow SPU-side processing for PLAYSTATION 3 (added non-virtual methods)
Also comment-out some code for __SPU__ to reduce code size
Added btContactConstraint (only used on PS3 SPU right now, better to use btPersistentManifold directly for contact constraints)
Improved readblend utility library (see also usage in http://gamekit.googlecode.com with Irrlicht)

Fix for btConvexConvexAlgorithm, potential division by zero
Thanks linzner http://code.google.com/p/bullet/issues/detail?id=260
2009-08-05 22:14:46 +00:00
rponom
99f6ff7cf3 Some fixes to work with constraint angle limits close to -PI or PI 2009-06-12 01:23:47 +00:00
rponom
c680791ce9 3 new constraints added : btGeneric6DofSpringConstraint, btUniversalConstraint, btHinge2Constraint
Motors for btConeTwistConstraint added (for obsolete solver only)
appConstraintDemo changed to test new constraints
Several coding-style fixes
2009-05-21 22:10:13 +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
rponom
1991bf3013 Added getInfo1()/ getInfo2() code for joints to support the new SIMD constraint solver 2008-12-25 02:13:46 +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
rponom
65f8a7e70e Current slider position member and access function added 2008-09-06 00:55:26 +00:00
erwin.coumans
fe5033119b Add some accessor methods to btHingeConstraint and btSliderConstraint, to allow conversion.
Thanks to Roman Ponomarev.
2008-07-22 02:15:17 +00:00
rponom
6141a55f09 Added linear and angular motors for the slider constraint 2008-05-23 22:52:51 +00:00
rponom
d175bfa22a Added slider constraint class btSliderConstraint 2008-04-05 01:09:26 +00:00