aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorRobert Adams2014-08-21 06:33:04 -0700
committerRobert Adams2014-08-21 06:33:04 -0700
commit674be7222568ff719f082564d02cb68811adcd7f (patch)
tree8c1b27daf3d13c3bd8972278dd0f0ce1a2a17ca4 /OpenSim/Region
parentBulletSim: Windows and Linux 32 and 64 bit versions of Bullet 2.82 (diff)
downloadopensim-SC-674be7222568ff719f082564d02cb68811adcd7f.zip
opensim-SC-674be7222568ff719f082564d02cb68811adcd7f.tar.gz
opensim-SC-674be7222568ff719f082564d02cb68811adcd7f.tar.bz2
opensim-SC-674be7222568ff719f082564d02cb68811adcd7f.tar.xz
BulletSim: add new Bullet 2.82 constraint type codes and rename the
BulletSim fixed constraint to not be confused with the native version.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs4
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs12
2 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs b/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs
index be6f152..0458cd9 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs
@@ -43,9 +43,11 @@ public enum ConstraintType : int
43 SLIDER_CONSTRAINT_TYPE, 43 SLIDER_CONSTRAINT_TYPE,
44 CONTACT_CONSTRAINT_TYPE, 44 CONTACT_CONSTRAINT_TYPE,
45 D6_SPRING_CONSTRAINT_TYPE, 45 D6_SPRING_CONSTRAINT_TYPE,
46 GEAR_CONSTRAINT_TYPE, // added in Bullet 2.82
47 FIXED_CONSTRAINT_TYPE, // added in Bullet 2.82
46 MAX_CONSTRAINT_TYPE, // last type defined by Bullet 48 MAX_CONSTRAINT_TYPE, // last type defined by Bullet
47 // 49 //
48 FIXED_CONSTRAINT_TYPE = 1234 // BulletSim constraint that is fixed and unmoving 50 BS_FIXED_CONSTRAINT_TYPE = 1234 // BulletSim constraint that is fixed and unmoving
49} 51}
50 52
51// =============================================================================== 53// ===============================================================================
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs
index aaf92c8..b0a5ef1 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs
@@ -78,7 +78,7 @@ public sealed class BSLinksetConstraints : BSLinkset
78 public override void ResetLink() 78 public override void ResetLink()
79 { 79 {
80 // constraintType = ConstraintType.D6_CONSTRAINT_TYPE; 80 // constraintType = ConstraintType.D6_CONSTRAINT_TYPE;
81 constraintType = ConstraintType.FIXED_CONSTRAINT_TYPE; 81 constraintType = ConstraintType.BS_FIXED_CONSTRAINT_TYPE;
82 linearLimitLow = OMV.Vector3.Zero; 82 linearLimitLow = OMV.Vector3.Zero;
83 linearLimitHigh = OMV.Vector3.Zero; 83 linearLimitHigh = OMV.Vector3.Zero;
84 angularLimitLow = OMV.Vector3.Zero; 84 angularLimitLow = OMV.Vector3.Zero;
@@ -115,7 +115,7 @@ public sealed class BSLinksetConstraints : BSLinkset
115 member.PhysScene.DetailLog("{0},BSLinkInfoConstraint.SetLinkParameters,type={1}", member.LocalID, constraintType); 115 member.PhysScene.DetailLog("{0},BSLinkInfoConstraint.SetLinkParameters,type={1}", member.LocalID, constraintType);
116 switch (constraintType) 116 switch (constraintType)
117 { 117 {
118 case ConstraintType.FIXED_CONSTRAINT_TYPE: 118 case ConstraintType.BS_FIXED_CONSTRAINT_TYPE:
119 case ConstraintType.D6_CONSTRAINT_TYPE: 119 case ConstraintType.D6_CONSTRAINT_TYPE:
120 BSConstraint6Dof constrain6dof = constrain as BSConstraint6Dof; 120 BSConstraint6Dof constrain6dof = constrain as BSConstraint6Dof;
121 if (constrain6dof != null) 121 if (constrain6dof != null)
@@ -179,7 +179,7 @@ public sealed class BSLinksetConstraints : BSLinkset
179 public override bool ShouldUpdateChildProperties() 179 public override bool ShouldUpdateChildProperties()
180 { 180 {
181 bool ret = true; 181 bool ret = true;
182 if (constraintType == ConstraintType.FIXED_CONSTRAINT_TYPE) 182 if (constraintType == ConstraintType.BS_FIXED_CONSTRAINT_TYPE)
183 ret = false; 183 ret = false;
184 184
185 return ret; 185 return ret;
@@ -363,7 +363,7 @@ public sealed class BSLinksetConstraints : BSLinkset
363 363
364 switch (linkInfo.constraintType) 364 switch (linkInfo.constraintType)
365 { 365 {
366 case ConstraintType.FIXED_CONSTRAINT_TYPE: 366 case ConstraintType.BS_FIXED_CONSTRAINT_TYPE:
367 case ConstraintType.D6_CONSTRAINT_TYPE: 367 case ConstraintType.D6_CONSTRAINT_TYPE:
368 // Relative position normalized to the root prim 368 // Relative position normalized to the root prim
369 // Essentually a vector pointing from center of rootPrim to center of li.member 369 // Essentually a vector pointing from center of rootPrim to center of li.member
@@ -536,7 +536,7 @@ public sealed class BSLinksetConstraints : BSLinkset
536 { 536 {
537 int requestedType = (int)pParams[2]; 537 int requestedType = (int)pParams[2];
538 DetailLog("{0},BSLinksetConstraint.ChangeLinkType,requestedType={1}", LinksetRoot.LocalID, requestedType); 538 DetailLog("{0},BSLinksetConstraint.ChangeLinkType,requestedType={1}", LinksetRoot.LocalID, requestedType);
539 if (requestedType == (int)ConstraintType.FIXED_CONSTRAINT_TYPE 539 if (requestedType == (int)ConstraintType.BS_FIXED_CONSTRAINT_TYPE
540 || requestedType == (int)ConstraintType.D6_CONSTRAINT_TYPE 540 || requestedType == (int)ConstraintType.D6_CONSTRAINT_TYPE
541 || requestedType == (int)ConstraintType.D6_SPRING_CONSTRAINT_TYPE 541 || requestedType == (int)ConstraintType.D6_SPRING_CONSTRAINT_TYPE
542 || requestedType == (int)ConstraintType.HINGE_CONSTRAINT_TYPE 542 || requestedType == (int)ConstraintType.HINGE_CONSTRAINT_TYPE
@@ -646,7 +646,7 @@ public sealed class BSLinksetConstraints : BSLinkset
646 case ExtendedPhysics.PHYS_PARAM_LINK_TYPE: 646 case ExtendedPhysics.PHYS_PARAM_LINK_TYPE:
647 valueInt = (int)pParams[opIndex + 1]; 647 valueInt = (int)pParams[opIndex + 1];
648 ConstraintType valueType = (ConstraintType)valueInt; 648 ConstraintType valueType = (ConstraintType)valueInt;
649 if (valueType == ConstraintType.FIXED_CONSTRAINT_TYPE 649 if (valueType == ConstraintType.BS_FIXED_CONSTRAINT_TYPE
650 || valueType == ConstraintType.D6_CONSTRAINT_TYPE 650 || valueType == ConstraintType.D6_CONSTRAINT_TYPE
651 || valueType == ConstraintType.D6_SPRING_CONSTRAINT_TYPE 651 || valueType == ConstraintType.D6_SPRING_CONSTRAINT_TYPE
652 || valueType == ConstraintType.HINGE_CONSTRAINT_TYPE 652 || valueType == ConstraintType.HINGE_CONSTRAINT_TYPE