aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authorroot2011-07-15 20:07:59 +0100
committerroot2011-07-15 20:07:59 +0100
commite9dbe54ab1217e4310b0e7e014516363237e2a21 (patch)
treea7dc65799c92dc288c8d4d3d6c6f0c4adc824380 /OpenSim/Region/Physics
parentfix duplication of physical objects for physics engines that care about the i... (diff)
downloadopensim-SC_OLD-e9dbe54ab1217e4310b0e7e014516363237e2a21.zip
opensim-SC_OLD-e9dbe54ab1217e4310b0e7e014516363237e2a21.tar.gz
opensim-SC_OLD-e9dbe54ab1217e4310b0e7e014516363237e2a21.tar.bz2
opensim-SC_OLD-e9dbe54ab1217e4310b0e7e014516363237e2a21.tar.xz
Fix some local id issues in physics glue
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs8
-rw-r--r--OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs7
-rw-r--r--OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs8
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs19
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs8
-rw-r--r--OpenSim/Region/Physics/OdePlugin/Tests/ODETestClass.cs2
-rw-r--r--OpenSim/Region/Physics/POSPlugin/POSScene.cs8
-rw-r--r--OpenSim/Region/Physics/PhysXPlugin/PhysXScene.cs8
8 files changed, 14 insertions, 54 deletions
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs
index b6e1cb4..6c9d9ab 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs
@@ -84,13 +84,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
84*/ 84*/
85 85
86 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, 86 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
87 Vector3 size, Quaternion rotation) 87 Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
88 {
89 return AddPrimShape(primName, pbs, position, size, rotation, false);
90 }
91
92 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
93 Vector3 size, Quaternion rotation, bool isPhysical)
94 { 88 {
95 return null; 89 return null;
96 } 90 }
diff --git a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs
index 6df213d..0d1bd82 100644
--- a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs
+++ b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETScene.cs
@@ -213,12 +213,7 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
213 return newPrim; 213 return newPrim;
214 } 214 }
215 215
216 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, Vector3 size, Quaternion rotation) 216 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
217 {
218 return AddPrimShape(primName, pbs, position, size, rotation, false);
219 }
220
221 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, Vector3 size, Quaternion rotation, bool isPhysical)
222 { 217 {
223 PhysicsActor result; 218 PhysicsActor result;
224 IMesh mesh = null; 219 IMesh mesh = null;
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
index e2a6a2e..df62dbc 100644
--- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
+++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
@@ -626,13 +626,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
626 } 626 }
627 627
628 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, OpenMetaverse.Vector3 position, 628 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, OpenMetaverse.Vector3 position,
629 OpenMetaverse.Vector3 size, OpenMetaverse.Quaternion rotation) 629 OpenMetaverse.Vector3 size, OpenMetaverse.Quaternion rotation, bool isPhysical, uint localid)
630 {
631 return AddPrimShape(primName, pbs, position, size, rotation, false);
632 }
633
634 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, OpenMetaverse.Vector3 position,
635 OpenMetaverse.Vector3 size, OpenMetaverse.Quaternion rotation, bool isPhysical)
636 { 630 {
637 PhysicsActor result; 631 PhysicsActor result;
638 632
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index 0de4626..28ace34 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -88,15 +88,16 @@ namespace OpenSim.Region.Physics.Manager
88 88
89 public abstract void RemovePrim(PhysicsActor prim); 89 public abstract void RemovePrim(PhysicsActor prim);
90 90
91 //public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
92 // Vector3 size, Quaternion rotation); //To be removed - Actually removed!
93
91 public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, 94 public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
92 Vector3 size, Quaternion rotation); //To be removed 95 Vector3 size, Quaternion rotation, bool isPhysical, uint localid);
93 public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
94 Vector3 size, Quaternion rotation, bool isPhysical);
95 96
96 public virtual PhysicsActor AddPrimShape(uint localID, string primName, PrimitiveBaseShape pbs, Vector3 position, 97 public virtual PhysicsActor AddPrimShape(uint localID, string primName, PrimitiveBaseShape pbs, Vector3 position,
97 Vector3 size, Quaternion rotation, bool isPhysical) 98 Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
98 { 99 {
99 PhysicsActor ret = AddPrimShape(primName, pbs, position, size, rotation, isPhysical); 100 PhysicsActor ret = AddPrimShape(primName, pbs, position, size, rotation, isPhysical, localid);
100 101
101 if (ret != null) 102 if (ret != null)
102 ret.LocalID = localID; 103 ret.LocalID = localID;
@@ -284,13 +285,7 @@ namespace OpenSim.Region.Physics.Manager
284*/ 285*/
285 286
286 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, 287 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
287 Vector3 size, Quaternion rotation) //To be removed 288 Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
288 {
289 return AddPrimShape(primName, pbs, position, size, rotation, false);
290 }
291
292 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
293 Vector3 size, Quaternion rotation, bool isPhysical)
294 { 289 {
295 m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddPrim({0},{1})", position, size); 290 m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddPrim({0},{1})", position, size);
296 return PhysicsActor.Null; 291 return PhysicsActor.Null;
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index ba8cba4..6fda32d 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -1708,13 +1708,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1708 } 1708 }
1709 1709
1710 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, 1710 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
1711 Vector3 size, Quaternion rotation) //To be removed 1711 Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
1712 {
1713 return AddPrimShape(primName, pbs, position, size, rotation, false);
1714 }
1715
1716 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
1717 Vector3 size, Quaternion rotation, bool isPhysical)
1718 { 1712 {
1719#if SPAM 1713#if SPAM
1720 m_log.DebugFormat("[PHYSICS]: Adding physics actor to {0}", primName); 1714 m_log.DebugFormat("[PHYSICS]: Adding physics actor to {0}", primName);
diff --git a/OpenSim/Region/Physics/OdePlugin/Tests/ODETestClass.cs b/OpenSim/Region/Physics/OdePlugin/Tests/ODETestClass.cs
index fbd1574..2ea810f 100644
--- a/OpenSim/Region/Physics/OdePlugin/Tests/ODETestClass.cs
+++ b/OpenSim/Region/Physics/OdePlugin/Tests/ODETestClass.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Region.Physics.OdePlugin.Tests
84 Vector3 position = new Vector3(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f), 128f); 84 Vector3 position = new Vector3(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f), 128f);
85 Vector3 size = new Vector3(0.5f, 0.5f, 0.5f); 85 Vector3 size = new Vector3(0.5f, 0.5f, 0.5f);
86 Quaternion rot = Quaternion.Identity; 86 Quaternion rot = Quaternion.Identity;
87 PhysicsActor prim = ps.AddPrimShape("CoolShape", newcube, position, size, rot, true); 87 PhysicsActor prim = ps.AddPrimShape("CoolShape", newcube, position, size, rot, true, 0);
88 OdePrim oprim = (OdePrim)prim; 88 OdePrim oprim = (OdePrim)prim;
89 OdeScene pscene = (OdeScene) ps; 89 OdeScene pscene = (OdeScene) ps;
90 90
diff --git a/OpenSim/Region/Physics/POSPlugin/POSScene.cs b/OpenSim/Region/Physics/POSPlugin/POSScene.cs
index c3f5040..2f24a50 100644
--- a/OpenSim/Region/Physics/POSPlugin/POSScene.cs
+++ b/OpenSim/Region/Physics/POSPlugin/POSScene.cs
@@ -91,13 +91,7 @@ namespace OpenSim.Region.Physics.POSPlugin
91*/ 91*/
92 92
93 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, 93 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
94 Vector3 size, Quaternion rotation) 94 Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
95 {
96 return AddPrimShape(primName, pbs, position, size, rotation, false);
97 }
98
99 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
100 Vector3 size, Quaternion rotation, bool isPhysical)
101 { 95 {
102 POSPrim prim = new POSPrim(); 96 POSPrim prim = new POSPrim();
103 prim.Position = position; 97 prim.Position = position;
diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXScene.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXScene.cs
index 4de4b01..beb3404 100644
--- a/OpenSim/Region/Physics/PhysXPlugin/PhysXScene.cs
+++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXScene.cs
@@ -108,13 +108,7 @@ namespace OpenSim.Region.Physics.PhysXPlugin
108 } 108 }
109 109
110 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, 110 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
111 Vector3 size, Quaternion rotation) //To be removed 111 Vector3 size, Quaternion rotation, bool isPhysical, uint localid)
112 {
113 return AddPrimShape(primName, pbs, position, size, rotation, false);
114 }
115
116 public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position,
117 Vector3 size, Quaternion rotation, bool isPhysical)
118 { 112 {
119 return AddPrim(position, size, rotation); 113 return AddPrim(position, size, rotation);
120 } 114 }