diff options
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs index ae54499..3a27d2c 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | |||
@@ -438,6 +438,28 @@ public override BulletConstraint Create6DofConstraintToPoint(BulletWorld world, | |||
438 | joinPoint, useLinearReferenceFrameA, disableCollisionsBetweenLinkedBodies)); | 438 | joinPoint, useLinearReferenceFrameA, disableCollisionsBetweenLinkedBodies)); |
439 | } | 439 | } |
440 | 440 | ||
441 | public override BulletConstraint Create6DofConstraintFixed(BulletWorld world, BulletBody obj1, | ||
442 | Vector3 frameInBloc, Quaternion frameInBrot, | ||
443 | bool useLinearReferenceFrameB, bool disableCollisionsBetweenLinkedBodies) | ||
444 | { | ||
445 | BulletWorldUnman worldu = world as BulletWorldUnman; | ||
446 | BulletBodyUnman bodyu1 = obj1 as BulletBodyUnman; | ||
447 | return new BulletConstraintUnman(BSAPICPP.Create6DofConstraintFixed2(worldu.ptr, bodyu1.ptr, | ||
448 | frameInBloc, frameInBrot, useLinearReferenceFrameB, disableCollisionsBetweenLinkedBodies)); | ||
449 | } | ||
450 | |||
451 | public override BulletConstraint Create6DofSpringConstraint(BulletWorld world, BulletBody obj1, BulletBody obj2, | ||
452 | Vector3 frame1loc, Quaternion frame1rot, | ||
453 | Vector3 frame2loc, Quaternion frame2rot, | ||
454 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies) | ||
455 | { | ||
456 | BulletWorldUnman worldu = world as BulletWorldUnman; | ||
457 | BulletBodyUnman bodyu1 = obj1 as BulletBodyUnman; | ||
458 | BulletBodyUnman bodyu2 = obj2 as BulletBodyUnman; | ||
459 | return new BulletConstraintUnman(BSAPICPP.Create6DofSpringConstraint2(worldu.ptr, bodyu1.ptr, bodyu2.ptr, frame1loc, frame1rot, | ||
460 | frame2loc, frame2rot, useLinearReferenceFrameA, disableCollisionsBetweenLinkedBodies)); | ||
461 | } | ||
462 | |||
441 | public override BulletConstraint CreateHingeConstraint(BulletWorld world, BulletBody obj1, BulletBody obj2, | 463 | public override BulletConstraint CreateHingeConstraint(BulletWorld world, BulletBody obj1, BulletBody obj2, |
442 | Vector3 pivotinA, Vector3 pivotinB, | 464 | Vector3 pivotinA, Vector3 pivotinB, |
443 | Vector3 axisInA, Vector3 axisInB, | 465 | Vector3 axisInA, Vector3 axisInB, |
@@ -450,6 +472,52 @@ public override BulletConstraint CreateHingeConstraint(BulletWorld world, Bullet | |||
450 | pivotinA, pivotinB, axisInA, axisInB, useLinearReferenceFrameA, disableCollisionsBetweenLinkedBodies)); | 472 | pivotinA, pivotinB, axisInA, axisInB, useLinearReferenceFrameA, disableCollisionsBetweenLinkedBodies)); |
451 | } | 473 | } |
452 | 474 | ||
475 | public override BulletConstraint CreateSliderConstraint(BulletWorld world, BulletBody obj1, BulletBody obj2, | ||
476 | Vector3 frame1loc, Quaternion frame1rot, | ||
477 | Vector3 frame2loc, Quaternion frame2rot, | ||
478 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies) | ||
479 | { | ||
480 | BulletWorldUnman worldu = world as BulletWorldUnman; | ||
481 | BulletBodyUnman bodyu1 = obj1 as BulletBodyUnman; | ||
482 | BulletBodyUnman bodyu2 = obj2 as BulletBodyUnman; | ||
483 | return new BulletConstraintUnman(BSAPICPP.CreateSliderConstraint2(worldu.ptr, bodyu1.ptr, bodyu2.ptr, frame1loc, frame1rot, | ||
484 | frame2loc, frame2rot, useLinearReferenceFrameA, disableCollisionsBetweenLinkedBodies)); | ||
485 | } | ||
486 | |||
487 | public override BulletConstraint CreateConeTwistConstraint(BulletWorld world, BulletBody obj1, BulletBody obj2, | ||
488 | Vector3 frame1loc, Quaternion frame1rot, | ||
489 | Vector3 frame2loc, Quaternion frame2rot, | ||
490 | bool disableCollisionsBetweenLinkedBodies) | ||
491 | { | ||
492 | BulletWorldUnman worldu = world as BulletWorldUnman; | ||
493 | BulletBodyUnman bodyu1 = obj1 as BulletBodyUnman; | ||
494 | BulletBodyUnman bodyu2 = obj2 as BulletBodyUnman; | ||
495 | return new BulletConstraintUnman(BSAPICPP.CreateConeTwistConstraint2(worldu.ptr, bodyu1.ptr, bodyu2.ptr, frame1loc, frame1rot, | ||
496 | frame2loc, frame2rot, disableCollisionsBetweenLinkedBodies)); | ||
497 | } | ||
498 | |||
499 | public override BulletConstraint CreateGearConstraint(BulletWorld world, BulletBody obj1, BulletBody obj2, | ||
500 | Vector3 axisInA, Vector3 axisInB, | ||
501 | float ratio, bool disableCollisionsBetweenLinkedBodies) | ||
502 | { | ||
503 | BulletWorldUnman worldu = world as BulletWorldUnman; | ||
504 | BulletBodyUnman bodyu1 = obj1 as BulletBodyUnman; | ||
505 | BulletBodyUnman bodyu2 = obj2 as BulletBodyUnman; | ||
506 | return new BulletConstraintUnman(BSAPICPP.CreateGearConstraint2(worldu.ptr, bodyu1.ptr, bodyu2.ptr, axisInA, axisInB, | ||
507 | ratio, disableCollisionsBetweenLinkedBodies)); | ||
508 | } | ||
509 | |||
510 | public override BulletConstraint CreatePoint2PointConstraint(BulletWorld world, BulletBody obj1, BulletBody obj2, | ||
511 | Vector3 pivotInA, Vector3 pivotInB, | ||
512 | bool disableCollisionsBetweenLinkedBodies) | ||
513 | { | ||
514 | BulletWorldUnman worldu = world as BulletWorldUnman; | ||
515 | BulletBodyUnman bodyu1 = obj1 as BulletBodyUnman; | ||
516 | BulletBodyUnman bodyu2 = obj2 as BulletBodyUnman; | ||
517 | return new BulletConstraintUnman(BSAPICPP.CreatePoint2PointConstraint2(worldu.ptr, bodyu1.ptr, bodyu2.ptr, pivotInA, pivotInB, | ||
518 | disableCollisionsBetweenLinkedBodies)); | ||
519 | } | ||
520 | |||
453 | public override void SetConstraintEnable(BulletConstraint constrain, float numericTrueFalse) | 521 | public override void SetConstraintEnable(BulletConstraint constrain, float numericTrueFalse) |
454 | { | 522 | { |
455 | BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; | 523 | BulletConstraintUnman constrainu = constrain as BulletConstraintUnman; |
@@ -1426,12 +1494,46 @@ public static extern IntPtr Create6DofConstraintToPoint2(IntPtr world, IntPtr ob | |||
1426 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies); | 1494 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies); |
1427 | 1495 | ||
1428 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1496 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
1497 | public static extern IntPtr Create6DofConstraintFixed2(IntPtr world, IntPtr obj1, | ||
1498 | Vector3 frameInBloc, Quaternion frameInBrot, | ||
1499 | bool useLinearReferenceFrameB, bool disableCollisionsBetweenLinkedBodies); | ||
1500 | |||
1501 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1502 | public static extern IntPtr Create6DofSpringConstraint2(IntPtr world, IntPtr obj1, IntPtr obj2, | ||
1503 | Vector3 frame1loc, Quaternion frame1rot, | ||
1504 | Vector3 frame2loc, Quaternion frame2rot, | ||
1505 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies); | ||
1506 | |||
1507 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1429 | public static extern IntPtr CreateHingeConstraint2(IntPtr world, IntPtr obj1, IntPtr obj2, | 1508 | public static extern IntPtr CreateHingeConstraint2(IntPtr world, IntPtr obj1, IntPtr obj2, |
1430 | Vector3 pivotinA, Vector3 pivotinB, | 1509 | Vector3 pivotinA, Vector3 pivotinB, |
1431 | Vector3 axisInA, Vector3 axisInB, | 1510 | Vector3 axisInA, Vector3 axisInB, |
1432 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies); | 1511 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies); |
1433 | 1512 | ||
1434 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1513 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
1514 | public static extern IntPtr CreateSliderConstraint2(IntPtr world, IntPtr obj1, IntPtr obj2, | ||
1515 | Vector3 frameInAloc, Quaternion frameInArot, | ||
1516 | Vector3 frameInBloc, Quaternion frameInBrot, | ||
1517 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies); | ||
1518 | |||
1519 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1520 | public static extern IntPtr CreateConeTwistConstraint2(IntPtr world, IntPtr obj1, IntPtr obj2, | ||
1521 | Vector3 frameInAloc, Quaternion frameInArot, | ||
1522 | Vector3 frameInBloc, Quaternion frameInBrot, | ||
1523 | bool disableCollisionsBetweenLinkedBodies); | ||
1524 | |||
1525 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1526 | public static extern IntPtr CreateGearConstraint2(IntPtr world, IntPtr obj1, IntPtr obj2, | ||
1527 | Vector3 axisInA, Vector3 axisInB, | ||
1528 | float ratio, bool disableCollisionsBetweenLinkedBodies); | ||
1529 | |||
1530 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1531 | public static extern IntPtr CreatePoint2PointConstraint2(IntPtr world, IntPtr obj1, IntPtr obj2, | ||
1532 | Vector3 pivotInA, Vector3 pivotInB, | ||
1533 | bool disableCollisionsBetweenLinkedBodies); | ||
1534 | |||
1535 | |||
1536 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1435 | public static extern void SetConstraintEnable2(IntPtr constrain, float numericTrueFalse); | 1537 | public static extern void SetConstraintEnable2(IntPtr constrain, float numericTrueFalse); |
1436 | 1538 | ||
1437 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1539 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |