aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
diff options
context:
space:
mode:
authorMelanie2013-08-01 01:23:24 +0100
committerMelanie2013-08-01 01:23:24 +0100
commit21f5e670303ee978c747567e674e5ebe256ad2c7 (patch)
tree19c3740cbb8bf78d038e64b2fb66ea837cc8f724 /OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
parentMerge branch 'master' into careminster (diff)
parentInclude missing reference that probably stops windows build from commit 12995... (diff)
downloadopensim-SC_OLD-21f5e670303ee978c747567e674e5ebe256ad2c7.zip
opensim-SC_OLD-21f5e670303ee978c747567e674e5ebe256ad2c7.tar.gz
opensim-SC_OLD-21f5e670303ee978c747567e674e5ebe256ad2c7.tar.bz2
opensim-SC_OLD-21f5e670303ee978c747567e674e5ebe256ad2c7.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs18
1 files changed, 15 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
index 960c0b4..7f94666 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
@@ -309,16 +309,18 @@ public abstract class BSLinkset
309 } 309 }
310 ); 310 );
311 } 311 }
312 public virtual void ComputeLocalInertia(OMV.Vector3 inertiaFactor) 312 public virtual void ComputeAndSetLocalInertia(OMV.Vector3 inertiaFactor, float linksetMass)
313 { 313 {
314 ForEachMember((member) => 314 ForEachMember((member) =>
315 { 315 {
316 if (member.PhysBody.HasPhysicalBody) 316 if (member.PhysBody.HasPhysicalBody)
317 { 317 {
318 OMV.Vector3 inertia = m_physicsScene.PE.CalculateLocalInertia(member.PhysShape.physShapeInfo, member.Mass); 318 OMV.Vector3 inertia = m_physicsScene.PE.CalculateLocalInertia(member.PhysShape.physShapeInfo, linksetMass);
319 member.Inertia = inertia * inertiaFactor; 319 member.Inertia = inertia * inertiaFactor;
320 m_physicsScene.PE.SetMassProps(member.PhysBody, member.Mass, member.Inertia); 320 m_physicsScene.PE.SetMassProps(member.PhysBody, linksetMass, member.Inertia);
321 m_physicsScene.PE.UpdateInertiaTensor(member.PhysBody); 321 m_physicsScene.PE.UpdateInertiaTensor(member.PhysBody);
322 DetailLog("{0},BSLinkset.ComputeAndSetLocalInertia,m.mass={1}, inertia={2}", member.LocalID, linksetMass, member.Inertia);
323
322 } 324 }
323 return false; // 'false' says to continue looping 325 return false; // 'false' says to continue looping
324 } 326 }
@@ -334,6 +336,16 @@ public abstract class BSLinkset
334 } 336 }
335 ); 337 );
336 } 338 }
339 public virtual void AddToPhysicalCollisionFlags(CollisionFlags collFlags)
340 {
341 ForEachMember((member) =>
342 {
343 if (member.PhysBody.HasPhysicalBody)
344 m_physicsScene.PE.AddToCollisionFlags(member.PhysBody, collFlags);
345 return false; // 'false' says to continue looping
346 }
347 );
348 }
337 public virtual void RemoveFromPhysicalCollisionFlags(CollisionFlags collFlags) 349 public virtual void RemoveFromPhysicalCollisionFlags(CollisionFlags collFlags)
338 { 350 {
339 ForEachMember((member) => 351 ForEachMember((member) =>