public void Initialize() { IConfigSource openSimINI = new IniConfigSource(); IConfig startupConfig = openSimINI.AddConfig("Startup"); startupConfig.Set("physics", "OpenDynamicsEngine"); startupConfig.Set("DecodedSculptMapPath", "j2kDecodeCache"); Vector3 regionExtent = new Vector3(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight); //PhysicsScene pScene = physicsPluginManager.GetPhysicsScene( // "BulletSim", "Meshmerizer", openSimINI, "BSTestRegion", regionExtent); RegionInfo info = new RegionInfo(); info.RegionName = "ODETestRegion"; info.RegionSizeX = info.RegionSizeY = info.RegionSizeZ = Constants.RegionSize; OpenSim.Region.Framework.Scenes.Scene scene = new OpenSim.Region.Framework.Scenes.Scene(info); //IMesher mesher = new OpenSim.Region.PhysicsModule.Meshing.Meshmerizer(); //INonSharedRegionModule mod = mesher as INonSharedRegionModule; //mod.Initialise(openSimINI); //mod.AddRegion(scene); //mod.RegionLoaded(scene); // pScene = new OdeScene(); odemodule = new OpenSim.Region.PhysicsModule.ODE.OdeModule(); Console.WriteLine("HERE " + (odemodule == null ? "Null" : "Not null")); odemodule.Initialise(openSimINI); odemodule.AddRegion(scene); odemodule.RegionLoaded(scene); // Loading ODEPlugin //cbt = new OdePlugin(); // Getting Physics Scene //ps = cbt.GetScene("test"); // Initializing Physics Scene. //ps.Initialise(imp.GetMesher(TopConfig), null, Vector3.Zero); float[] _heightmap = new float[(int)Constants.RegionSize * (int)Constants.RegionSize]; for (int i = 0; i < ((int)Constants.RegionSize * (int)Constants.RegionSize); i++) { _heightmap[i] = 21f; } pScene = scene.PhysicsScene; pScene.SetTerrain(_heightmap); }