remove some MegaRegions code from physics

LSLKeyTest
UbitUmarov 2016-09-01 16:15:51 +01:00
parent fced64aef5
commit 6c6a965320
4 changed files with 0 additions and 78 deletions

View File

@ -954,25 +954,6 @@ namespace OpenSim.Region.PhysicsModule.BulletS
// m_log.DebugFormat("{0}: DeleteTerrain()", LogHeader); // m_log.DebugFormat("{0}: DeleteTerrain()", LogHeader);
} }
// Although no one seems to check this, I do support combining.
public override bool SupportsCombining()
{
return TerrainManager.SupportsCombining();
}
// This call says I am a child to region zero in a mega-region. 'pScene' is that
// of region zero, 'offset' is my offset from regions zero's origin, and
// 'extents' is the largest XY that is handled in my region.
public override void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents)
{
TerrainManager.Combine(pScene, offset, extents);
}
// Unhook all the combining that I know about.
public override void UnCombine(PhysicsScene pScene)
{
TerrainManager.UnCombine(pScene);
}
#endregion // Terrain #endregion // Terrain
public override Dictionary<uint, float> GetTopColliders() public override Dictionary<uint, float> GetTopColliders()

View File

@ -258,8 +258,6 @@ namespace OpenSim.Region.PhysicsModule.ODE
private Random fluidRandomizer = new Random(Environment.TickCount); private Random fluidRandomizer = new Random(Environment.TickCount);
public bool m_suportCombine = true;
private uint m_regionWidth = Constants.RegionSize; private uint m_regionWidth = Constants.RegionSize;
private uint m_regionHeight = Constants.RegionSize; private uint m_regionHeight = Constants.RegionSize;
@ -542,8 +540,6 @@ namespace OpenSim.Region.PhysicsModule.ODE
WorldExtents.Y = regionExtent.Y; WorldExtents.Y = regionExtent.Y;
m_regionHeight = (uint)regionExtent.Y; m_regionHeight = (uint)regionExtent.Y;
m_suportCombine = false;
nearCallback = near; nearCallback = near;
m_rayCastManager = new ODERayCastRequestManager(this); m_rayCastManager = new ODERayCastRequestManager(this);
@ -1627,15 +1623,6 @@ namespace OpenSim.Region.PhysicsModule.ODE
#endregion #endregion
public override void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents)
{
if (!m_suportCombine)
return;
m_worldOffset = offset;
WorldExtents = new Vector2(extents.X, extents.Y);
m_parentScene = pScene;
}
// Recovered for use by fly height. Kitto Flora // Recovered for use by fly height. Kitto Flora
internal float GetTerrainHeightAtXY(float x, float y) internal float GetTerrainHeightAtXY(float x, float y)
{ {
@ -1643,12 +1630,6 @@ namespace OpenSim.Region.PhysicsModule.ODE
int offsetX = 0; int offsetX = 0;
int offsetY = 0; int offsetY = 0;
if (m_suportCombine)
{
offsetX = ((int)(x / (int)Constants.RegionSize)) * (int)Constants.RegionSize;
offsetY = ((int)(y / (int)Constants.RegionSize)) * (int)Constants.RegionSize;
}
if(RegionTerrain.TryGetValue(new Vector3(offsetX,offsetY,0), out heightFieldGeom)) if(RegionTerrain.TryGetValue(new Vector3(offsetX,offsetY,0), out heightFieldGeom))
{ {
if (heightFieldGeom != IntPtr.Zero) if (heightFieldGeom != IntPtr.Zero)
@ -3387,11 +3368,6 @@ namespace OpenSim.Region.PhysicsModule.ODE
return waterlevel; return waterlevel;
} }
public override bool SupportsCombining()
{
return m_suportCombine;
}
public override void SetWaterLevel(float baseheight) public override void SetWaterLevel(float baseheight)
{ {
waterlevel = baseheight; waterlevel = baseheight;

View File

@ -332,15 +332,6 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
return false; return false;
} }
public virtual bool SupportsCombining()
{
return false;
}
public virtual void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents) {}
public virtual void CombineTerrain(float[] heightMap, Vector3 pOffset) {}
public virtual void UnCombine(PhysicsScene pScene) {}
/// <summary> /// <summary>
/// Queue a raycast against the physics scene. /// Queue a raycast against the physics scene.
/// The provided callback method will be called when the raycast is complete /// The provided callback method will be called when the raycast is complete

View File

@ -171,7 +171,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public bool m_OSOdeLib = false; public bool m_OSOdeLib = false;
public bool m_suportCombine = false; // mega suport not tested
public Scene m_frameWorkScene = null; public Scene m_frameWorkScene = null;
// private int threadid = 0; // private int threadid = 0;
@ -380,8 +379,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
WorldExtents.Y = m_frameWorkScene.RegionInfo.RegionSizeY; WorldExtents.Y = m_frameWorkScene.RegionInfo.RegionSizeY;
m_regionHeight = (uint)WorldExtents.Y; m_regionHeight = (uint)WorldExtents.Y;
m_suportCombine = false;
lock (OdeLock) lock (OdeLock)
{ {
// Create the world and the first space // Create the world and the first space
@ -1938,12 +1935,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
int offsetX = 0; int offsetX = 0;
int offsetY = 0; int offsetY = 0;
if (m_suportCombine)
{
offsetX = ((int)(x / (int)Constants.RegionSize)) * (int)Constants.RegionSize;
offsetY = ((int)(y / (int)Constants.RegionSize)) * (int)Constants.RegionSize;
}
// get region map // get region map
IntPtr heightFieldGeom = IntPtr.Zero; IntPtr heightFieldGeom = IntPtr.Zero;
if (!RegionTerrain.TryGetValue(new Vector3(offsetX, offsetY, 0), out heightFieldGeom)) if (!RegionTerrain.TryGetValue(new Vector3(offsetX, offsetY, 0), out heightFieldGeom))
@ -2076,12 +2067,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
int offsetX = 0; int offsetX = 0;
int offsetY = 0; int offsetY = 0;
if (m_suportCombine)
{
offsetX = ((int)(x / (int)Constants.RegionSize)) * (int)Constants.RegionSize;
offsetY = ((int)(y / (int)Constants.RegionSize)) * (int)Constants.RegionSize;
}
// get region map // get region map
IntPtr heightFieldGeom = IntPtr.Zero; IntPtr heightFieldGeom = IntPtr.Zero;
Vector3 norm = new Vector3(0, 0, 1); Vector3 norm = new Vector3(0, 0, 1);
@ -2224,12 +2209,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
} }
} }
public override void CombineTerrain(float[] heightMap, Vector3 pOffset)
{
if(m_suportCombine)
SetTerrain(heightMap, pOffset);
}
public void SetTerrain(float[] heightMap, Vector3 pOffset) public void SetTerrain(float[] heightMap, Vector3 pOffset)
{ {
if (m_OSOdeLib) if (m_OSOdeLib)
@ -2479,11 +2458,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
return waterlevel; return waterlevel;
} }
public override bool SupportsCombining()
{
return m_suportCombine;
}
public override void SetWaterLevel(float baseheight) public override void SetWaterLevel(float baseheight)
{ {
waterlevel = baseheight; waterlevel = baseheight;