diff options
author | Robert Adams | 2013-08-07 07:54:47 -0700 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-09-20 21:01:44 +0100 |
commit | 0acde92af969b3251aec95e4ea08d618da39d184 (patch) | |
tree | 885ab6fe19096dbceb2e0266824699dd00b0875f /OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | |
parent | BulletSim: fixes for change linkset implementation of physical linksets. (diff) | |
download | opensim-SC_OLD-0acde92af969b3251aec95e4ea08d618da39d184.zip opensim-SC_OLD-0acde92af969b3251aec95e4ea08d618da39d184.tar.gz opensim-SC_OLD-0acde92af969b3251aec95e4ea08d618da39d184.tar.bz2 opensim-SC_OLD-0acde92af969b3251aec95e4ea08d618da39d184.tar.xz |
BulletSim: add API and calls for spring constraint parameters.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs index 12a0c17..6c36485 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | |||
@@ -596,6 +596,30 @@ public override bool SetBreakingImpulseThreshold(BulletConstraint constrain, flo | |||
596 | return BSAPICPP.SetBreakingImpulseThreshold2(constrainu.ptr, threshold); | 596 | return BSAPICPP.SetBreakingImpulseThreshold2(constrainu.ptr, threshold); |
597 | } | 597 | } |
598 | 598 | ||
599 | public override bool SpringEnable(BulletConstraint constrain, int index, float numericTrueFalse) | ||
600 | { | ||
601 | BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; | ||
602 | return BSAPICPP.ConstraintSpringEnable2(constrainu.ptr, index, numericTrueFalse); | ||
603 | } | ||
604 | |||
605 | public override bool SpringSetEquilibriumPoint(BulletConstraint constrain, int index, float equilibriumPoint) | ||
606 | { | ||
607 | BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; | ||
608 | return BSAPICPP.ConstraintSpringSetEquilibriumPoint2(constrainu.ptr, index, equilibriumPoint); | ||
609 | } | ||
610 | |||
611 | public override bool SpringSetStiffness(BulletConstraint constrain, int index, float stiffnesss) | ||
612 | { | ||
613 | BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; | ||
614 | return BSAPICPP.ConstraintSpringSetStiffness2(constrainu.ptr, index, stiffnesss); | ||
615 | } | ||
616 | |||
617 | public override bool SpringSetDamping(BulletConstraint constrain, int index, float damping) | ||
618 | { | ||
619 | BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; | ||
620 | return BSAPICPP.ConstraintSpringSetDamping2(constrainu.ptr, index, damping); | ||
621 | } | ||
622 | |||
599 | public override bool CalculateTransforms(BulletConstraint constrain) | 623 | public override bool CalculateTransforms(BulletConstraint constrain) |
600 | { | 624 | { |
601 | BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; | 625 | BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; |
@@ -1601,6 +1625,18 @@ public static extern bool TranslationalLimitMotor2(IntPtr constrain, float enabl | |||
1601 | public static extern bool SetBreakingImpulseThreshold2(IntPtr constrain, float threshold); | 1625 | public static extern bool SetBreakingImpulseThreshold2(IntPtr constrain, float threshold); |
1602 | 1626 | ||
1603 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1627 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
1628 | public static extern bool ConstraintSpringEnable2(IntPtr constrain, int index, float numericTrueFalse); | ||
1629 | |||
1630 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1631 | public static extern bool ConstraintSpringSetEquilibriumPoint2(IntPtr constrain, int index, float equilibriumPoint); | ||
1632 | |||
1633 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1634 | public static extern bool ConstraintSpringSetStiffness2(IntPtr constrain, int index, float stiffness); | ||
1635 | |||
1636 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1637 | public static extern bool ConstraintSpringSetDamping2(IntPtr constrain, int index, float damping); | ||
1638 | |||
1639 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1604 | public static extern bool CalculateTransforms2(IntPtr constrain); | 1640 | public static extern bool CalculateTransforms2(IntPtr constrain); |
1605 | 1641 | ||
1606 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1642 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |