aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs16
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs2
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs5
3 files changed, 8 insertions, 15 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
index 76c2187..ad8e10f 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
@@ -33,14 +33,6 @@ using OMV = OpenMetaverse;
33namespace OpenSim.Region.Physics.BulletSPlugin 33namespace OpenSim.Region.Physics.BulletSPlugin
34{ 34{
35 35
36// A BSPrim can get individual information about its linkedness attached
37// to it through an instance of a subclass of LinksetInfo.
38// Each type of linkset will define the information needed for its type.
39public abstract class BSLinksetInfo
40{
41 public virtual void Clear() { }
42}
43
44public abstract class BSLinkset 36public abstract class BSLinkset
45{ 37{
46 // private static string LogHeader = "[BULLETSIM LINKSET]"; 38 // private static string LogHeader = "[BULLETSIM LINKSET]";
@@ -56,15 +48,15 @@ public abstract class BSLinkset
56 { 48 {
57 BSLinkset ret = null; 49 BSLinkset ret = null;
58 50
59 switch ((int)BSParam.LinksetImplementation) 51 switch (parent.LinksetType)
60 { 52 {
61 case (int)LinksetImplementation.Constraint: 53 case LinksetImplementation.Constraint:
62 ret = new BSLinksetConstraints(physScene, parent); 54 ret = new BSLinksetConstraints(physScene, parent);
63 break; 55 break;
64 case (int)LinksetImplementation.Compound: 56 case LinksetImplementation.Compound:
65 ret = new BSLinksetCompound(physScene, parent); 57 ret = new BSLinksetCompound(physScene, parent);
66 break; 58 break;
67 case (int)LinksetImplementation.Manual: 59 case LinksetImplementation.Manual:
68 // ret = new BSLinksetManual(physScene, parent); 60 // ret = new BSLinksetManual(physScene, parent);
69 break; 61 break;
70 default: 62 default:
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
index 350a5d1..308cf13 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
@@ -238,7 +238,6 @@ public sealed class BSLinksetCompound : BSLinkset
238 // there will already be a rebuild scheduled. 238 // there will already be a rebuild scheduled.
239 DetailLog("{0},BSLinksetCompound.UpdateProperties,couldNotUpdateChild.schedulingRebuild,whichUpdated={1}", 239 DetailLog("{0},BSLinksetCompound.UpdateProperties,couldNotUpdateChild.schedulingRebuild,whichUpdated={1}",
240 updated.LocalID, whichUpdated); 240 updated.LocalID, whichUpdated);
241 updated.LinksetInfo = null; // setting to 'null' causes relative position to be recomputed.
242 ScheduleRebuild(updated); 241 ScheduleRebuild(updated);
243 } 242 }
244 } 243 }
@@ -294,7 +293,6 @@ public sealed class BSLinksetCompound : BSLinkset
294 child.LocalID, child.PhysBody.AddrString); 293 child.LocalID, child.PhysBody.AddrString);
295 294
296 // Cause the child's body to be rebuilt and thus restored to normal operation 295 // Cause the child's body to be rebuilt and thus restored to normal operation
297 child.LinksetInfo = null;
298 child.ForceBodyShapeRebuild(false); 296 child.ForceBodyShapeRebuild(false);
299 297
300 if (!HasAnyChildren) 298 if (!HasAnyChildren)
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs
index 235da78..87eed98 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs
@@ -41,12 +41,15 @@ public class BSPrimLinkable : BSPrimDisplaced
41 // The index of this child prim. 41 // The index of this child prim.
42 public int LinksetChildIndex { get; set; } 42 public int LinksetChildIndex { get; set; }
43 43
44 public BSLinksetInfo LinksetInfo { get; set; } 44 public BSLinkset.LinksetImplementation LinksetType { get; set; }
45 45
46 public BSPrimLinkable(uint localID, String primName, BSScene parent_scene, OMV.Vector3 pos, OMV.Vector3 size, 46 public BSPrimLinkable(uint localID, String primName, BSScene parent_scene, OMV.Vector3 pos, OMV.Vector3 size,
47 OMV.Quaternion rotation, PrimitiveBaseShape pbs, bool pisPhysical) 47 OMV.Quaternion rotation, PrimitiveBaseShape pbs, bool pisPhysical)
48 : base(localID, primName, parent_scene, pos, size, rotation, pbs, pisPhysical) 48 : base(localID, primName, parent_scene, pos, size, rotation, pbs, pisPhysical)
49 { 49 {
50 // Default linkset implementation for this prim
51 LinksetType = (BSLinkset.LinksetImplementation)BSParam.LinksetImplementation;
52
50 Linkset = BSLinkset.Factory(PhysScene, this); 53 Linkset = BSLinkset.Factory(PhysScene, this);
51 54
52 PhysScene.TaintedObject("BSPrimLinksetCompound.Refresh", delegate() 55 PhysScene.TaintedObject("BSPrimLinksetCompound.Refresh", delegate()