From 85bdec5e0d30224f66851fe4183eb03e15828fbf Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Mon, 16 Jul 2007 20:10:54 +0000 Subject: * Massive restructuring of RegionApplicationBase, OpenSimMain and SimpleApp --- .../Region/ClientStack/RegionApplicationBase.cs | 40 ++++++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index ec7eee4..043659b 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -37,16 +37,17 @@ using OpenSim.Framework.Types; using OpenSim.Physics.Manager; using OpenSim.Region.Caches; using OpenSim.Region.Environment; +using libsecondlife; namespace OpenSim.Region.ClientStack { - public class RegionApplicationBase + public abstract class RegionApplicationBase { protected AssetCache m_assetCache; protected InventoryCache m_inventoryCache; protected Dictionary m_clientCircuits = new Dictionary(); protected DateTime m_startuptime; - protected NetworkServersInfo m_serversData; + protected NetworkServersInfo m_networkServersInfo; protected List m_udpServer = new List(); protected List m_regionData = new List(); @@ -58,7 +59,40 @@ namespace OpenSim.Region.ClientStack public RegionApplicationBase( ) { - + m_startuptime = DateTime.Now; } + + virtual public void StartUp() + { + ClientView.TerrainManager = new TerrainManager(new SecondLife()); + m_networkServersInfo = new NetworkServersInfo(); + RegionInfo m_regionInfo = new RegionInfo(); + + Initialize(); + + StartLog(); + + } + + protected abstract void Initialize(); + + private void StartLog() + { + LogBase logBase = CreateLog(); + m_log = logBase; + MainLog.Instance = m_log; + } + + protected abstract LogBase CreateLog(); + protected abstract PhysicsScene GetPhysicsScene( ); + + protected PhysicsScene GetPhysicsScene(string engine) + { + PhysicsPluginManager physicsPluginManager; + physicsPluginManager = new PhysicsPluginManager(); + physicsPluginManager.LoadPlugins(); + return physicsPluginManager.GetPhysicsScene( engine ); + } + } } -- cgit v1.1