aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs
diff options
context:
space:
mode:
authorRobert Adams2013-02-17 20:07:04 -0800
committerRobert Adams2013-02-17 20:13:49 -0800
commit1d7276235ace0ed6b7701efa36a7fd7f1b552bab (patch)
treeb7880a0e97da37a2852ad4643ea6ae03ae386018 /OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs
parentBulletSim: rework parameter setting for different types of values (diff)
downloadopensim-SC_OLD-1d7276235ace0ed6b7701efa36a7fd7f1b552bab.zip
opensim-SC_OLD-1d7276235ace0ed6b7701efa36a7fd7f1b552bab.tar.gz
opensim-SC_OLD-1d7276235ace0ed6b7701efa36a7fd7f1b552bab.tar.bz2
opensim-SC_OLD-1d7276235ace0ed6b7701efa36a7fd7f1b552bab.tar.xz
BulletSim: add calls for creating all the different Bullet constraint types.
Updated the DLLs and SOs and code for BulletXNA to create the types. All the detailed control calls are not all in place yet.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs16
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;