add missing regionExtent setup and Scene physicsscene configuration ( not
exactly as core)avinationmerge
parent
0b105da626
commit
0af2fafddf
|
@ -767,7 +767,6 @@ namespace OpenSim
|
||||||
clientServer = clientNetworkServers;
|
clientServer = clientNetworkServers;
|
||||||
scene.LoadWorldMap();
|
scene.LoadWorldMap();
|
||||||
|
|
||||||
scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName);
|
|
||||||
scene.PhysicsScene.RequestAssetMethod = scene.PhysicsRequestAsset;
|
scene.PhysicsScene.RequestAssetMethod = scene.PhysicsRequestAsset;
|
||||||
scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised());
|
scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised());
|
||||||
scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight);
|
scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight);
|
||||||
|
@ -783,10 +782,12 @@ namespace OpenSim
|
||||||
protected override Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService,
|
protected override Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService,
|
||||||
IEstateDataService estateDataService, AgentCircuitManager circuitManager)
|
IEstateDataService estateDataService, AgentCircuitManager circuitManager)
|
||||||
{
|
{
|
||||||
|
Vector3 regionExtent = new Vector3(regionInfo.RegionSizeX, regionInfo.RegionSizeY, regionInfo.RegionSizeZ);
|
||||||
|
PhysicsScene physicsScene = GetPhysicsScene(regionInfo.RegionName, regionExtent);
|
||||||
SceneCommunicationService sceneGridService = new SceneCommunicationService();
|
SceneCommunicationService sceneGridService = new SceneCommunicationService();
|
||||||
|
|
||||||
return new Scene(
|
return new Scene(
|
||||||
regionInfo, circuitManager, sceneGridService,
|
regionInfo, circuitManager, physicsScene, sceneGridService,
|
||||||
simDataService, estateDataService,
|
simDataService, estateDataService,
|
||||||
Config, m_version);
|
Config, m_version);
|
||||||
}
|
}
|
||||||
|
@ -829,10 +830,10 @@ namespace OpenSim
|
||||||
|
|
||||||
# region Setup methods
|
# region Setup methods
|
||||||
|
|
||||||
protected override PhysicsScene GetPhysicsScene(string osSceneIdentifier)
|
protected override PhysicsScene GetPhysicsScene(string osSceneIdentifier, Vector3 regionExtent)
|
||||||
{
|
{
|
||||||
return GetPhysicsScene(
|
return GetPhysicsScene(
|
||||||
m_configSettings.PhysicsEngine, m_configSettings.MeshEngineName, Config, osSceneIdentifier);
|
m_configSettings.PhysicsEngine, m_configSettings.MeshEngineName, Config, osSceneIdentifier, regionExtent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -69,7 +69,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
/// The name of the OpenSim scene this physics scene is serving. This will be used in log messages.
|
/// The name of the OpenSim scene this physics scene is serving. This will be used in log messages.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected abstract PhysicsScene GetPhysicsScene(string osSceneIdentifier);
|
protected abstract PhysicsScene GetPhysicsScene(string osSceneIdentifier, Vector3 regionExtent);
|
||||||
|
|
||||||
protected abstract ClientStackManager CreateClientStackManager();
|
protected abstract ClientStackManager CreateClientStackManager();
|
||||||
protected abstract Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager);
|
protected abstract Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager);
|
||||||
|
@ -135,13 +135,13 @@ namespace OpenSim.Region.ClientStack
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected PhysicsScene GetPhysicsScene(
|
protected PhysicsScene GetPhysicsScene(
|
||||||
string engine, string meshEngine, IConfigSource config, string osSceneIdentifier)
|
string engine, string meshEngine, IConfigSource config, string osSceneIdentifier, Vector3 regionExtent)
|
||||||
{
|
{
|
||||||
PhysicsPluginManager physicsPluginManager;
|
PhysicsPluginManager physicsPluginManager;
|
||||||
physicsPluginManager = new PhysicsPluginManager();
|
physicsPluginManager = new PhysicsPluginManager();
|
||||||
physicsPluginManager.LoadPluginsFromAssemblies("Physics");
|
physicsPluginManager.LoadPluginsFromAssemblies("Physics");
|
||||||
|
|
||||||
return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier);
|
return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier, regionExtent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -760,7 +760,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
|
|
||||||
public Scene(RegionInfo regInfo, AgentCircuitManager authen,
|
public Scene(RegionInfo regInfo, AgentCircuitManager authen, PhysicsScene physicsScene,
|
||||||
SceneCommunicationService sceneGridService,
|
SceneCommunicationService sceneGridService,
|
||||||
ISimulationDataService simDataService, IEstateDataService estateDataService,
|
ISimulationDataService simDataService, IEstateDataService estateDataService,
|
||||||
IConfigSource config, string simulatorVersion)
|
IConfigSource config, string simulatorVersion)
|
||||||
|
@ -840,6 +840,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
new EventManager.LandObjectRemoved(simDataService.RemoveLandObject);
|
new EventManager.LandObjectRemoved(simDataService.RemoveLandObject);
|
||||||
|
|
||||||
m_sceneGraph = new SceneGraph(this);
|
m_sceneGraph = new SceneGraph(this);
|
||||||
|
m_sceneGraph.PhysicsScene = physicsScene;
|
||||||
|
|
||||||
// If the scene graph has an Unrecoverable error, restart this sim.
|
// If the scene graph has an Unrecoverable error, restart this sim.
|
||||||
// Currently the only thing that causes it to happen is two kinds of specific
|
// Currently the only thing that causes it to happen is two kinds of specific
|
||||||
|
@ -1075,7 +1076,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
PhysicalPrims = true;
|
PhysicalPrims = true;
|
||||||
CollidablePrims = true;
|
CollidablePrims = true;
|
||||||
PhysicsEnabled = true;
|
// this is done above acording to config
|
||||||
|
// PhysicsEnabled = true;
|
||||||
|
|
||||||
PeriodicBackup = true;
|
PeriodicBackup = true;
|
||||||
UseBackup = true;
|
UseBackup = true;
|
||||||
|
|
|
@ -138,8 +138,15 @@ namespace OpenSim.Tests.Common
|
||||||
|
|
||||||
SceneCommunicationService scs = new SceneCommunicationService();
|
SceneCommunicationService scs = new SceneCommunicationService();
|
||||||
|
|
||||||
|
PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager();
|
||||||
|
physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll");
|
||||||
|
Vector3 regionExtent = new Vector3(regInfo.RegionSizeX, regInfo.RegionSizeY, regInfo.RegionSizeZ);
|
||||||
|
PhysicsScene physicsScene
|
||||||
|
= physicsPluginManager.GetPhysicsScene(
|
||||||
|
"basicphysics", "ZeroMesher", new IniConfigSource(), "test", regionExtent);
|
||||||
|
|
||||||
TestScene testScene = new TestScene(
|
TestScene testScene = new TestScene(
|
||||||
regInfo, m_acm, scs, m_simDataService, m_estateDataService, configSource, null);
|
regInfo, m_acm, physicsScene, scs, m_simDataService, m_estateDataService, configSource, null);
|
||||||
|
|
||||||
INonSharedRegionModule godsModule = new GodsModule();
|
INonSharedRegionModule godsModule = new GodsModule();
|
||||||
godsModule.Initialise(new IniConfigSource());
|
godsModule.Initialise(new IniConfigSource());
|
||||||
|
@ -184,11 +191,6 @@ namespace OpenSim.Tests.Common
|
||||||
testScene.LandChannel = new TestLandChannel(testScene);
|
testScene.LandChannel = new TestLandChannel(testScene);
|
||||||
testScene.LoadWorldMap();
|
testScene.LoadWorldMap();
|
||||||
|
|
||||||
PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager();
|
|
||||||
physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll");
|
|
||||||
testScene.PhysicsScene
|
|
||||||
= physicsPluginManager.GetPhysicsScene("basicphysics", "ZeroMesher", new IniConfigSource(), "test");
|
|
||||||
|
|
||||||
testScene.RegionInfo.EstateSettings = new EstateSettings();
|
testScene.RegionInfo.EstateSettings = new EstateSettings();
|
||||||
testScene.LoginsEnabled = true;
|
testScene.LoginsEnabled = true;
|
||||||
testScene.RegisterRegionWithGrid();
|
testScene.RegisterRegionWithGrid();
|
||||||
|
|
|
@ -33,16 +33,17 @@ using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Region.Framework;
|
using OpenSim.Region.Framework;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
using OpenSim.Region.Physics.Manager;
|
||||||
|
|
||||||
namespace OpenSim.Tests.Common.Mock
|
namespace OpenSim.Tests.Common.Mock
|
||||||
{
|
{
|
||||||
public class TestScene : Scene
|
public class TestScene : Scene
|
||||||
{
|
{
|
||||||
public TestScene(
|
public TestScene(
|
||||||
RegionInfo regInfo, AgentCircuitManager authen,
|
RegionInfo regInfo, AgentCircuitManager authen, PhysicsScene physicsScene,
|
||||||
SceneCommunicationService sceneGridService, ISimulationDataService simDataService, IEstateDataService estateDataService,
|
SceneCommunicationService sceneGridService, ISimulationDataService simDataService, IEstateDataService estateDataService,
|
||||||
IConfigSource config, string simulatorVersion)
|
IConfigSource config, string simulatorVersion)
|
||||||
: base(regInfo, authen, sceneGridService, simDataService, estateDataService,
|
: base(regInfo, authen, physicsScene, sceneGridService, simDataService, estateDataService,
|
||||||
config, simulatorVersion)
|
config, simulatorVersion)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue