aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules
diff options
context:
space:
mode:
authorUbitUmarov2016-09-01 16:15:51 +0100
committerUbitUmarov2016-09-01 16:15:51 +0100
commit6c6a965320951250e7cbcc8c9875cab4b603bc76 (patch)
treed0f89e9ad2bc6193850a65d2f287229a54b9e74c /OpenSim/Region/PhysicsModules
parentchange asset upload retry timer AutoReset back to true (diff)
downloadopensim-SC-6c6a965320951250e7cbcc8c9875cab4b603bc76.zip
opensim-SC-6c6a965320951250e7cbcc8c9875cab4b603bc76.tar.gz
opensim-SC-6c6a965320951250e7cbcc8c9875cab4b603bc76.tar.bz2
opensim-SC-6c6a965320951250e7cbcc8c9875cab4b603bc76.tar.xz
remove some MegaRegions code from physics
Diffstat (limited to 'OpenSim/Region/PhysicsModules')
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSScene.cs19
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/OdeScene.cs24
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs9
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs26
4 files changed, 0 insertions, 78 deletions
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs
index 9b677be..ee57f0c 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs
@@ -954,25 +954,6 @@ namespace OpenSim.Region.PhysicsModule.BulletS
954 // m_log.DebugFormat("{0}: DeleteTerrain()", LogHeader); 954 // m_log.DebugFormat("{0}: DeleteTerrain()", LogHeader);
955 } 955 }
956 956
957 // Although no one seems to check this, I do support combining.
958 public override bool SupportsCombining()
959 {
960 return TerrainManager.SupportsCombining();
961 }
962 // This call says I am a child to region zero in a mega-region. 'pScene' is that
963 // of region zero, 'offset' is my offset from regions zero's origin, and
964 // 'extents' is the largest XY that is handled in my region.
965 public override void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents)
966 {
967 TerrainManager.Combine(pScene, offset, extents);
968 }
969
970 // Unhook all the combining that I know about.
971 public override void UnCombine(PhysicsScene pScene)
972 {
973 TerrainManager.UnCombine(pScene);
974 }
975
976 #endregion // Terrain 957 #endregion // Terrain
977 958
978 public override Dictionary<uint, float> GetTopColliders() 959 public override Dictionary<uint, float> GetTopColliders()
diff --git a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
index 7021a05..ed2aad4 100644
--- a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
@@ -258,8 +258,6 @@ namespace OpenSim.Region.PhysicsModule.ODE
258 258
259 private Random fluidRandomizer = new Random(Environment.TickCount); 259 private Random fluidRandomizer = new Random(Environment.TickCount);
260 260
261 public bool m_suportCombine = true;
262
263 private uint m_regionWidth = Constants.RegionSize; 261 private uint m_regionWidth = Constants.RegionSize;
264 private uint m_regionHeight = Constants.RegionSize; 262 private uint m_regionHeight = Constants.RegionSize;
265 263
@@ -542,8 +540,6 @@ namespace OpenSim.Region.PhysicsModule.ODE
542 WorldExtents.Y = regionExtent.Y; 540 WorldExtents.Y = regionExtent.Y;
543 m_regionHeight = (uint)regionExtent.Y; 541 m_regionHeight = (uint)regionExtent.Y;
544 542
545 m_suportCombine = false;
546
547 nearCallback = near; 543 nearCallback = near;
548 m_rayCastManager = new ODERayCastRequestManager(this); 544 m_rayCastManager = new ODERayCastRequestManager(this);
549 545
@@ -1627,15 +1623,6 @@ namespace OpenSim.Region.PhysicsModule.ODE
1627 1623
1628 #endregion 1624 #endregion
1629 1625
1630 public override void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents)
1631 {
1632 if (!m_suportCombine)
1633 return;
1634 m_worldOffset = offset;
1635 WorldExtents = new Vector2(extents.X, extents.Y);
1636 m_parentScene = pScene;
1637 }
1638
1639 // Recovered for use by fly height. Kitto Flora 1626 // Recovered for use by fly height. Kitto Flora
1640 internal float GetTerrainHeightAtXY(float x, float y) 1627 internal float GetTerrainHeightAtXY(float x, float y)
1641 { 1628 {
@@ -1643,12 +1630,6 @@ namespace OpenSim.Region.PhysicsModule.ODE
1643 int offsetX = 0; 1630 int offsetX = 0;
1644 int offsetY = 0; 1631 int offsetY = 0;
1645 1632
1646 if (m_suportCombine)
1647 {
1648 offsetX = ((int)(x / (int)Constants.RegionSize)) * (int)Constants.RegionSize;
1649 offsetY = ((int)(y / (int)Constants.RegionSize)) * (int)Constants.RegionSize;
1650 }
1651
1652 if(RegionTerrain.TryGetValue(new Vector3(offsetX,offsetY,0), out heightFieldGeom)) 1633 if(RegionTerrain.TryGetValue(new Vector3(offsetX,offsetY,0), out heightFieldGeom))
1653 { 1634 {
1654 if (heightFieldGeom != IntPtr.Zero) 1635 if (heightFieldGeom != IntPtr.Zero)
@@ -3387,11 +3368,6 @@ namespace OpenSim.Region.PhysicsModule.ODE
3387 return waterlevel; 3368 return waterlevel;
3388 } 3369 }
3389 3370
3390 public override bool SupportsCombining()
3391 {
3392 return m_suportCombine;
3393 }
3394
3395 public override void SetWaterLevel(float baseheight) 3371 public override void SetWaterLevel(float baseheight)
3396 { 3372 {
3397 waterlevel = baseheight; 3373 waterlevel = baseheight;
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
index 65d8867..aa51c4e 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
@@ -332,15 +332,6 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
332 return false; 332 return false;
333 } 333 }
334 334
335 public virtual bool SupportsCombining()
336 {
337 return false;
338 }
339
340 public virtual void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents) {}
341 public virtual void CombineTerrain(float[] heightMap, Vector3 pOffset) {}
342 public virtual void UnCombine(PhysicsScene pScene) {}
343
344 /// <summary> 335 /// <summary>
345 /// Queue a raycast against the physics scene. 336 /// Queue a raycast against the physics scene.
346 /// The provided callback method will be called when the raycast is complete 337 /// The provided callback method will be called when the raycast is complete
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
index fc08819..e23e355 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
@@ -171,7 +171,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
171 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 171 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
172 172
173 public bool m_OSOdeLib = false; 173 public bool m_OSOdeLib = false;
174 public bool m_suportCombine = false; // mega suport not tested
175 public Scene m_frameWorkScene = null; 174 public Scene m_frameWorkScene = null;
176 175
177// private int threadid = 0; 176// private int threadid = 0;
@@ -380,8 +379,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
380 WorldExtents.Y = m_frameWorkScene.RegionInfo.RegionSizeY; 379 WorldExtents.Y = m_frameWorkScene.RegionInfo.RegionSizeY;
381 m_regionHeight = (uint)WorldExtents.Y; 380 m_regionHeight = (uint)WorldExtents.Y;
382 381
383 m_suportCombine = false;
384
385 lock (OdeLock) 382 lock (OdeLock)
386 { 383 {
387 // Create the world and the first space 384 // Create the world and the first space
@@ -1938,12 +1935,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1938 int offsetX = 0; 1935 int offsetX = 0;
1939 int offsetY = 0; 1936 int offsetY = 0;
1940 1937
1941 if (m_suportCombine)
1942 {
1943 offsetX = ((int)(x / (int)Constants.RegionSize)) * (int)Constants.RegionSize;
1944 offsetY = ((int)(y / (int)Constants.RegionSize)) * (int)Constants.RegionSize;
1945 }
1946
1947 // get region map 1938 // get region map
1948 IntPtr heightFieldGeom = IntPtr.Zero; 1939 IntPtr heightFieldGeom = IntPtr.Zero;
1949 if (!RegionTerrain.TryGetValue(new Vector3(offsetX, offsetY, 0), out heightFieldGeom)) 1940 if (!RegionTerrain.TryGetValue(new Vector3(offsetX, offsetY, 0), out heightFieldGeom))
@@ -2076,12 +2067,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2076 int offsetX = 0; 2067 int offsetX = 0;
2077 int offsetY = 0; 2068 int offsetY = 0;
2078 2069
2079 if (m_suportCombine)
2080 {
2081 offsetX = ((int)(x / (int)Constants.RegionSize)) * (int)Constants.RegionSize;
2082 offsetY = ((int)(y / (int)Constants.RegionSize)) * (int)Constants.RegionSize;
2083 }
2084
2085 // get region map 2070 // get region map
2086 IntPtr heightFieldGeom = IntPtr.Zero; 2071 IntPtr heightFieldGeom = IntPtr.Zero;
2087 Vector3 norm = new Vector3(0, 0, 1); 2072 Vector3 norm = new Vector3(0, 0, 1);
@@ -2224,12 +2209,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2224 } 2209 }
2225 } 2210 }
2226 2211
2227 public override void CombineTerrain(float[] heightMap, Vector3 pOffset)
2228 {
2229 if(m_suportCombine)
2230 SetTerrain(heightMap, pOffset);
2231 }
2232
2233 public void SetTerrain(float[] heightMap, Vector3 pOffset) 2212 public void SetTerrain(float[] heightMap, Vector3 pOffset)
2234 { 2213 {
2235 if (m_OSOdeLib) 2214 if (m_OSOdeLib)
@@ -2479,11 +2458,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
2479 return waterlevel; 2458 return waterlevel;
2480 } 2459 }
2481 2460
2482 public override bool SupportsCombining()
2483 {
2484 return m_suportCombine;
2485 }
2486
2487 public override void SetWaterLevel(float baseheight) 2461 public override void SetWaterLevel(float baseheight)
2488 { 2462 {
2489 waterlevel = baseheight; 2463 waterlevel = baseheight;