diff options
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs index ecb1b32..476a0e5 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs | |||
@@ -57,6 +57,7 @@ public sealed class BSConstraint6Dof : BSConstraint | |||
57 | obj1.ID, obj1.AddrString, obj2.ID, obj2.AddrString); | 57 | obj1.ID, obj1.AddrString, obj2.ID, obj2.AddrString); |
58 | } | 58 | } |
59 | 59 | ||
60 | // 6 Dof constraint based on a midpoint between the two constrained bodies | ||
60 | public BSConstraint6Dof(BulletWorld world, BulletBody obj1, BulletBody obj2, | 61 | public BSConstraint6Dof(BulletWorld world, BulletBody obj1, BulletBody obj2, |
61 | Vector3 joinPoint, | 62 | Vector3 joinPoint, |
62 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies) | 63 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies) |
@@ -94,6 +95,21 @@ public sealed class BSConstraint6Dof : BSConstraint | |||
94 | } | 95 | } |
95 | } | 96 | } |
96 | 97 | ||
98 | // A 6 Dof constraint that is fixed in the world and constrained to a on-the-fly created static object | ||
99 | public BSConstraint6Dof(BulletWorld world, BulletBody obj1, Vector3 frameInBloc, Quaternion frameInBrot, | ||
100 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies) | ||
101 | : base(world) | ||
102 | { | ||
103 | m_body1 = obj1; | ||
104 | m_body2 = obj1; // Look out for confusion down the road | ||
105 | m_constraint = PhysicsScene.PE.Create6DofConstraintFixed(m_world, m_body1, | ||
106 | frameInBloc, frameInBrot, | ||
107 | useLinearReferenceFrameA, disableCollisionsBetweenLinkedBodies); | ||
108 | m_enabled = true; | ||
109 | world.physicsScene.DetailLog("{0},BS6DofConstraint,createFixed,wID={1},rID={2},rBody={3}", | ||
110 | BSScene.DetailLogZero, world.worldID, obj1.ID, obj1.AddrString); | ||
111 | } | ||
112 | |||
97 | public bool SetFrames(Vector3 frameA, Quaternion frameArot, Vector3 frameB, Quaternion frameBrot) | 113 | public bool SetFrames(Vector3 frameA, Quaternion frameArot, Vector3 frameB, Quaternion frameBrot) |
98 | { | 114 | { |
99 | bool ret = false; | 115 | bool ret = false; |