aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs b/OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs
index 2a820be..9ad12a9 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs
@@ -752,6 +752,44 @@ private sealed class BulletConstraintXNA : BulletConstraint
752 constraint.SetBreakingImpulseThreshold(threshold); 752 constraint.SetBreakingImpulseThreshold(threshold);
753 return true; 753 return true;
754 } 754 }
755 public override bool SpringEnable(BulletConstraint pConstraint, int index, float numericTrueFalse)
756 {
757 Generic6DofSpringConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as Generic6DofSpringConstraint;
758 constraint.EnableSpring(index, (numericTrueFalse == 0f ? false : true));
759 return true;
760 }
761
762 public override bool SpringSetEquilibriumPoint(BulletConstraint pConstraint, int index, float equilibriumPoint)
763 {
764 Generic6DofSpringConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as Generic6DofSpringConstraint;
765 if (index == -1)
766 {
767 constraint.SetEquilibriumPoint();
768 }
769 else
770 {
771 if (equilibriumPoint == -1)
772 constraint.SetEquilibriumPoint(index);
773 else
774 constraint.SetEquilibriumPoint(index, equilibriumPoint);
775 }
776 return true;
777 }
778
779 public override bool SpringSetStiffness(BulletConstraint pConstraint, int index, float stiffness)
780 {
781 Generic6DofSpringConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as Generic6DofSpringConstraint;
782 constraint.SetStiffness(index, stiffness);
783 return true;
784 }
785
786 public override bool SpringSetDamping(BulletConstraint pConstraint, int index, float damping)
787 {
788 Generic6DofSpringConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as Generic6DofSpringConstraint;
789 constraint.SetDamping(index, damping);
790 return true;
791 }
792
755 //BulletSimAPI.SetAngularDamping(Prim.PhysBody.ptr, angularDamping); 793 //BulletSimAPI.SetAngularDamping(Prim.PhysBody.ptr, angularDamping);
756 public override void SetAngularDamping(BulletBody pBody, float angularDamping) 794 public override void SetAngularDamping(BulletBody pBody, float angularDamping)
757 { 795 {