diff options
author | Robert Adams | 2012-08-15 11:36:50 -0700 |
---|---|---|
committer | Robert Adams | 2012-08-15 12:08:21 -0700 |
commit | dd10cf01e70f757f70f18d442974688a45a2d433 (patch) | |
tree | ca1cd801fa143adbdc87106d04d3b78a3f57ddb2 /OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | |
parent | BulletSim: add locking to constraintCollection and rename some of the public ... (diff) | |
download | opensim-SC_OLD-dd10cf01e70f757f70f18d442974688a45a2d433.zip opensim-SC_OLD-dd10cf01e70f757f70f18d442974688a45a2d433.tar.gz opensim-SC_OLD-dd10cf01e70f757f70f18d442974688a45a2d433.tar.bz2 opensim-SC_OLD-dd10cf01e70f757f70f18d442974688a45a2d433.tar.xz |
BulletSim: add hinge constraint.
Update BulletSimAPI with new constraint related function calls.
Reorganize locking in BS6DofConstraint.
Update BS6DofConstraint to do constraint reset correctly.
Add new 'midpoint' construction of 6Dof constraint.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs index 6800b96..504bd3c 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | |||
@@ -416,6 +416,27 @@ public static extern IntPtr Create6DofConstraint2(IntPtr world, IntPtr obj1, Int | |||
416 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies); | 416 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies); |
417 | 417 | ||
418 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 418 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
419 | public static extern IntPtr Create6DofConstraintToPoint2(IntPtr world, IntPtr obj1, IntPtr obj2, | ||
420 | Vector3 joinPoint, | ||
421 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies); | ||
422 | |||
423 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
424 | public static extern IntPtr CreateHingeConstraint2(IntPtr world, IntPtr obj1, IntPtr obj2, | ||
425 | Vector3 pivotinA, Vector3 pivotinB, | ||
426 | Vector3 axisInA, Vector3 axisInB, | ||
427 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies); | ||
428 | |||
429 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
430 | public static extern void SetConstraintEnable2(IntPtr constrain, float numericTrueFalse); | ||
431 | |||
432 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
433 | public static extern void SetConstraintNumSolverIterations2(IntPtr constrain, float iterations); | ||
434 | |||
435 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
436 | public static extern bool SetFrames2(IntPtr constrain, | ||
437 | Vector3 frameA, Quaternion frameArot, Vector3 frameB, Quaternion frameBrot); | ||
438 | |||
439 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
419 | public static extern bool SetLinearLimits2(IntPtr constrain, Vector3 low, Vector3 hi); | 440 | public static extern bool SetLinearLimits2(IntPtr constrain, Vector3 low, Vector3 hi); |
420 | 441 | ||
421 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 442 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
@@ -428,6 +449,9 @@ public static extern bool UseFrameOffset2(IntPtr constrain, float enable); | |||
428 | public static extern bool TranslationalLimitMotor2(IntPtr constrain, float enable, float targetVel, float maxMotorForce); | 449 | public static extern bool TranslationalLimitMotor2(IntPtr constrain, float enable, float targetVel, float maxMotorForce); |
429 | 450 | ||
430 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 451 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
452 | public static extern bool SetBreakingImpulseThreshold2(IntPtr constrain, float threshold); | ||
453 | |||
454 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
431 | public static extern bool CalculateTransforms2(IntPtr constrain); | 455 | public static extern bool CalculateTransforms2(IntPtr constrain); |
432 | 456 | ||
433 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 457 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
@@ -518,6 +542,9 @@ public static extern bool SetGravity2(IntPtr obj, Vector3 val); | |||
518 | public static extern IntPtr ClearForces2(IntPtr obj); | 542 | public static extern IntPtr ClearForces2(IntPtr obj); |
519 | 543 | ||
520 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 544 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
545 | public static extern IntPtr ClearAllForces2(IntPtr obj); | ||
546 | |||
547 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
521 | public static extern bool SetMargin2(IntPtr obj, float val); | 548 | public static extern bool SetMargin2(IntPtr obj, float val); |
522 | 549 | ||
523 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 550 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |