From 50dbb9ffe480b08f13f7bebb8259193dc00f88dd Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Tue, 31 Jul 2012 09:23:05 -0700 Subject: BulletSim: add parameters and API calls for setting ERP and CFM. Set ERP and CFM in linkset constraints. Reorder rebuilding of object bodies so they are not rebuilt everytime something is linked and unlinked. --- OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs index a2650fb..c88e645 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs @@ -83,7 +83,8 @@ public class BSConstraintCollection : IDisposable return true; } - // Get the constraint between two bodies. There can be only one the way we're using them. + // Get the constraint between two bodies. There can be only one. + // Return 'true' if a constraint was found. public bool TryGetConstraint(BulletBody body1, BulletBody body2, out BSConstraint returnConstraint) { bool found = false; @@ -105,6 +106,9 @@ public class BSConstraintCollection : IDisposable return found; } + // Remove any constraint between the passed bodies. + // Presumed there is only one such constraint possible. + // Return 'true' if a constraint was found and destroyed. public bool RemoveAndDestroyConstraint(BulletBody body1, BulletBody body2) { // return BulletSimAPI.RemoveConstraint(m_world.ID, obj1.ID, obj2.ID); @@ -125,6 +129,8 @@ public class BSConstraintCollection : IDisposable return ret; } + // Remove all constraints that reference the passed body. + // Return 'true' if any constraints were destroyed. public bool RemoveAndDestroyConstraint(BulletBody body1) { // return BulletSimAPI.RemoveConstraintByID(m_world.ID, obj.ID); -- cgit v1.1