diff options
author | Robert Adams | 2012-07-31 09:23:05 -0700 |
---|---|---|
committer | Robert Adams | 2012-07-31 09:23:05 -0700 |
commit | 50dbb9ffe480b08f13f7bebb8259193dc00f88dd (patch) | |
tree | 20a35e254d4ec9180b75af2e0a02e61dec53e028 /OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-50dbb9ffe480b08f13f7bebb8259193dc00f88dd.zip opensim-SC-50dbb9ffe480b08f13f7bebb8259193dc00f88dd.tar.gz opensim-SC-50dbb9ffe480b08f13f7bebb8259193dc00f88dd.tar.bz2 opensim-SC-50dbb9ffe480b08f13f7bebb8259193dc00f88dd.tar.xz |
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.
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs | 8 |
1 files changed, 7 insertions, 1 deletions
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 | |||
83 | return true; | 83 | return true; |
84 | } | 84 | } |
85 | 85 | ||
86 | // Get the constraint between two bodies. There can be only one the way we're using them. | 86 | // Get the constraint between two bodies. There can be only one. |
87 | // Return 'true' if a constraint was found. | ||
87 | public bool TryGetConstraint(BulletBody body1, BulletBody body2, out BSConstraint returnConstraint) | 88 | public bool TryGetConstraint(BulletBody body1, BulletBody body2, out BSConstraint returnConstraint) |
88 | { | 89 | { |
89 | bool found = false; | 90 | bool found = false; |
@@ -105,6 +106,9 @@ public class BSConstraintCollection : IDisposable | |||
105 | return found; | 106 | return found; |
106 | } | 107 | } |
107 | 108 | ||
109 | // Remove any constraint between the passed bodies. | ||
110 | // Presumed there is only one such constraint possible. | ||
111 | // Return 'true' if a constraint was found and destroyed. | ||
108 | public bool RemoveAndDestroyConstraint(BulletBody body1, BulletBody body2) | 112 | public bool RemoveAndDestroyConstraint(BulletBody body1, BulletBody body2) |
109 | { | 113 | { |
110 | // return BulletSimAPI.RemoveConstraint(m_world.ID, obj1.ID, obj2.ID); | 114 | // return BulletSimAPI.RemoveConstraint(m_world.ID, obj1.ID, obj2.ID); |
@@ -125,6 +129,8 @@ public class BSConstraintCollection : IDisposable | |||
125 | return ret; | 129 | return ret; |
126 | } | 130 | } |
127 | 131 | ||
132 | // Remove all constraints that reference the passed body. | ||
133 | // Return 'true' if any constraints were destroyed. | ||
128 | public bool RemoveAndDestroyConstraint(BulletBody body1) | 134 | public bool RemoveAndDestroyConstraint(BulletBody body1) |
129 | { | 135 | { |
130 | // return BulletSimAPI.RemoveConstraintByID(m_world.ID, obj.ID); | 136 | // return BulletSimAPI.RemoveConstraintByID(m_world.ID, obj.ID); |