diff options
author | Robert Adams | 2013-08-07 10:15:28 -0700 |
---|---|---|
committer | Robert Adams | 2013-09-11 09:11:41 -0700 |
commit | 993bcec088ce5c3ec2f76f61842f19cbdcc89384 (patch) | |
tree | b376202e94e63aacf65e0ed7048a17537250c384 /OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | |
parent | BulletSim: complete linkage of spring constraint into linkset constraint. (diff) | |
download | opensim-SC_OLD-993bcec088ce5c3ec2f76f61842f19cbdcc89384.zip opensim-SC_OLD-993bcec088ce5c3ec2f76f61842f19cbdcc89384.tar.gz opensim-SC_OLD-993bcec088ce5c3ec2f76f61842f19cbdcc89384.tar.bz2 opensim-SC_OLD-993bcec088ce5c3ec2f76f61842f19cbdcc89384.tar.xz |
BulletSim: add unmanaged and XNA functions for hinge, slider and spring constraints.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs index 6c36485..8dfb01c 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | |||
@@ -596,6 +596,12 @@ 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 HingeSetLimits(BulletConstraint constrain, float low, float high, float softness, float bias, float relaxation) | ||
600 | { | ||
601 | BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; | ||
602 | return BSAPICPP.HingeSetLimits2(constrainu.ptr, low, high, softness, bias, relaxation); | ||
603 | } | ||
604 | |||
599 | public override bool SpringEnable(BulletConstraint constrain, int index, float numericTrueFalse) | 605 | public override bool SpringEnable(BulletConstraint constrain, int index, float numericTrueFalse) |
600 | { | 606 | { |
601 | BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; | 607 | BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; |
@@ -620,6 +626,30 @@ public override bool SpringSetDamping(BulletConstraint constrain, int index, flo | |||
620 | return BSAPICPP.ConstraintSpringSetDamping2(constrainu.ptr, index, damping); | 626 | return BSAPICPP.ConstraintSpringSetDamping2(constrainu.ptr, index, damping); |
621 | } | 627 | } |
622 | 628 | ||
629 | public override bool SliderSetLimits(BulletConstraint constrain, int lowerUpper, int linAng, float val) | ||
630 | { | ||
631 | BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; | ||
632 | return BSAPICPP.SliderSetLimits2(constrainu.ptr, lowerUpper, linAng, val); | ||
633 | } | ||
634 | |||
635 | public override bool SliderSet(BulletConstraint constrain, int softRestDamp, int dirLimOrtho, int linAng, float val) | ||
636 | { | ||
637 | BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; | ||
638 | return BSAPICPP.SliderSet2(constrainu.ptr, softRestDamp, dirLimOrtho, linAng, val); | ||
639 | } | ||
640 | |||
641 | public override bool SliderMotorEnable(BulletConstraint constrain, int linAng, float numericTrueFalse) | ||
642 | { | ||
643 | BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; | ||
644 | return BSAPICPP.SliderMotorEnable2(constrainu.ptr, linAng, numericTrueFalse); | ||
645 | } | ||
646 | |||
647 | public override bool SliderMotor(BulletConstraint constrain, int forceVel, int linAng, float val) | ||
648 | { | ||
649 | BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; | ||
650 | return BSAPICPP.SliderMotor2(constrainu.ptr, forceVel, linAng, val); | ||
651 | } | ||
652 | |||
623 | public override bool CalculateTransforms(BulletConstraint constrain) | 653 | public override bool CalculateTransforms(BulletConstraint constrain) |
624 | { | 654 | { |
625 | BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; | 655 | BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; |
@@ -1625,6 +1655,9 @@ public static extern bool TranslationalLimitMotor2(IntPtr constrain, float enabl | |||
1625 | public static extern bool SetBreakingImpulseThreshold2(IntPtr constrain, float threshold); | 1655 | public static extern bool SetBreakingImpulseThreshold2(IntPtr constrain, float threshold); |
1626 | 1656 | ||
1627 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1657 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
1658 | public static extern bool HingeSetLimits2(IntPtr constrain, float low, float high, float softness, float bias, float relaxation); | ||
1659 | |||
1660 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1628 | public static extern bool ConstraintSpringEnable2(IntPtr constrain, int index, float numericTrueFalse); | 1661 | public static extern bool ConstraintSpringEnable2(IntPtr constrain, int index, float numericTrueFalse); |
1629 | 1662 | ||
1630 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1663 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
@@ -1637,6 +1670,18 @@ public static extern bool ConstraintSpringSetStiffness2(IntPtr constrain, int in | |||
1637 | public static extern bool ConstraintSpringSetDamping2(IntPtr constrain, int index, float damping); | 1670 | public static extern bool ConstraintSpringSetDamping2(IntPtr constrain, int index, float damping); |
1638 | 1671 | ||
1639 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1672 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
1673 | public static extern bool SliderSetLimits2(IntPtr constrain, int lowerUpper, int linAng, float val); | ||
1674 | |||
1675 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1676 | public static extern bool SliderSet2(IntPtr constrain, int softRestDamp, int dirLimOrtho, int linAng, float val); | ||
1677 | |||
1678 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1679 | public static extern bool SliderMotorEnable2(IntPtr constrain, int linAng, float numericTrueFalse); | ||
1680 | |||
1681 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1682 | public static extern bool SliderMotor2(IntPtr constrain, int forceVel, int linAng, float val); | ||
1683 | |||
1684 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1640 | public static extern bool CalculateTransforms2(IntPtr constrain); | 1685 | public static extern bool CalculateTransforms2(IntPtr constrain); |
1641 | 1686 | ||
1642 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1687 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |