Пример #1
0
        public ViewSplash(LookingGlassBase llgb)
        {
            m_lgb = llgb;

            InitializeComponent();
            Random rand = new Random();

            string[] ContentLines = new String[30];
            int line = 0;
            ContentLines[line++] = LookingGlassBase.ApplicationName + "  " + LookingGlassBase.ApplicationVersion
            + "                      http://lookingglassviewer.org/";
            ContentLines[line++] = "";
            ContentLines[line++] = "Copyright (c) 2008-2010 Robert Adams (LookingGlass)";
            ContentLines[line++] = "Copyright (c) 2000-2006 Torus Knot Software Ltd (Ogre)";
            ContentLines[line++] = "Copyright (c) 2001 Peter Dimov and Multi Media Ltd. (Boost)";
            ContentLines[line++] = "Copyright (c) Contributors http://opensimulator.org/ (OpenSimulator)";
            ContentLines[line++] = "Copyright (c) 2007-2009, http://openmetaverse.org (OpenMetaverse)";
            ContentLines[line++] = "Copyright (c) Contributors, http://idealistviewer.org/ (Idealist)";
            ContentLines[line++] = "Copyright (c) 2009 Xavier Verguín González (SkyX)";
            ContentLines[line++] = "Copyright (c) 2009 John Resig (jQuery)";
            ContentLines[line++] = "Copyright (c) 2009, Gareth Watts (SparkLines)";
            ContentLines[line++] = "Copyright (c) 2004-2008 Matthew Holmes, Dan Moorehead, Rob Loach, C.J. Adams-Collier (Prebuild v2.0.4)";
            ContentLines[line++] = "Copyright (c) 2008 Linden Research, Inc. (Avatar mesh/artwork)";
            Array.Resize(ref ContentLines, line);
            this.WindowSplash.Lines = ContentLines;
            this.WindowSplash.Refresh();
            this.WindowSplash.BringToFront();
        }
Пример #2
0
        // IModule.OnLoad
        public void OnLoad(string modName, LookingGlassBase lgbase)
        {
            LogManager.Log.Log(LogLevel.DINIT, ModuleName + ".OnLoad()");
            m_moduleName = modName;
            m_lgb        = lgbase;
            ModuleParams.AddDefaultParameter(m_moduleName + ".InputSystem.Name", "WindowUI",
                                             "Name of the input module");

            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Camera.Far", "2048.0",
                                             "Far clip for camera");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Global.Ambient", "<0.4,0.4,0.4>",
                                             "Global ambient setting");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Sun.Ambient", "<0.4,0.4,0.4>",
                                             "Ambient lighting for the sun");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Sun.Specular", "<0.8,0.8,0.8>",
                                             "Specular lighting for the sun");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Sun.Diffuse", "<1.0,1.0,1.0>",
                                             "Diffuse lighting for the sun");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Moon.Ambient", "<0.4,0.4,0.4>",
                                             "Ambient lighting for the sun");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Moon.Specular", "<0.8,0.8,0.8>",
                                             "Specular lighting for the sun");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Moon.Diffuse", "<0.5, 0.5, 0.8>",
                                             "Diffuse lighting for the sun");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Avatar.Color", "<0.4,0.4,0.8>",
                                             "Color of avatar sphere");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Avatar.Transparancy", "0.6",
                                             "Transparancy of avatar sphere");
        }
 public override void OnLoad(string name, LookingGlassBase lgbase)
 {
     base.OnLoad(name, lgbase);
     m_apiName = "LLLP";
     ModuleParams.AddDefaultParameter(ModuleName + ".Comm.Name", "Comm", "Name of comm module to connect to");
     ModuleParams.AddDefaultParameter(ModuleName + ".APIName", m_apiName, "Name of api for this comm control");
 }
        public ViewSplash(LookingGlassBase llgb)
        {
            m_lgb = llgb;

            InitializeComponent();
            Random rand = new Random();

            string[] ContentLines = new String[30];
            int      line         = 0;

            ContentLines[line++] = LookingGlassBase.ApplicationName + "  " + LookingGlassBase.ApplicationVersion
                                   + "                      http://lookingglassviewer.org/";
            ContentLines[line++] = "";
            ContentLines[line++] = "Copyright (c) 2008-2010 Robert Adams (LookingGlass)";
            ContentLines[line++] = "Copyright (c) 2000-2006 Torus Knot Software Ltd (Ogre)";
            ContentLines[line++] = "Copyright (c) 2001 Peter Dimov and Multi Media Ltd. (Boost)";
            ContentLines[line++] = "Copyright (c) Contributors http://opensimulator.org/ (OpenSimulator)";
            ContentLines[line++] = "Copyright (c) 2007-2009, http://openmetaverse.org (OpenMetaverse)";
            ContentLines[line++] = "Copyright (c) Contributors, http://idealistviewer.org/ (Idealist)";
            ContentLines[line++] = "Copyright (c) 2009 Xavier Verguín González (SkyX)";
            ContentLines[line++] = "Copyright (c) 2009 John Resig (jQuery)";
            ContentLines[line++] = "Copyright (c) 2009, Gareth Watts (SparkLines)";
            ContentLines[line++] = "Copyright (c) 2004-2008 Matthew Holmes, Dan Moorehead, Rob Loach, C.J. Adams-Collier (Prebuild v2.0.4)";
            ContentLines[line++] = "Copyright (c) 2008 Linden Research, Inc. (Avatar mesh/artwork)";
            Array.Resize(ref ContentLines, line);
            this.WindowSplash.Lines = ContentLines;
            this.WindowSplash.Refresh();
            this.WindowSplash.BringToFront();
        }
        // IModule.OnLoad
        public virtual void OnLoad(string modName, LookingGlassBase lgbase)
        {
            LogManager.Log.Log(LogLevel.DINIT, ModuleName + ".OnLoad()");
            m_moduleName = modName;
            m_lgb        = lgbase;

            m_lgb.AppParams.AddDefaultParameter("ViewerWindow.Renderer.Name", "Renderer", "The renderer we will get UI from");
            m_lgb.AppParams.AddDefaultParameter("ViewerWindow.FramesPerSec", "15", "The rate to throttle frame rendering");

            InitializeComponent();

            // find the window and put the handle into the parameters so the rendering system can find it
            Control[] subControls = this.Controls.Find("LGWindow", true);
            if (subControls.Length == 1)
            {
                Control windowPanel = subControls[0];
                string  wHandle     = windowPanel.Handle.ToString();
                m_log.Log(LogLevel.DRADEGASTDETAIL, "Connecting to external window {0}, w={1}, h={2}",
                          wHandle, windowPanel.Width, windowPanel.Height);
                LGB.AppParams.AddDefaultParameter("Renderer.Ogre.ExternalWindow.Handle",
                                                  windowPanel.Handle.ToString(),
                                                  "The window handle to use for our rendering");
                LGB.AppParams.AddDefaultParameter("Renderer.Ogre.ExternalWindow.Width",
                                                  windowPanel.Width.ToString(), "width of external window");
                LGB.AppParams.AddDefaultParameter("Renderer.Ogre.ExternalWindow.Height",
                                                  windowPanel.Height.ToString(), "Height of external window");
            }
            else
            {
                m_log.Log(LogLevel.DBADERROR, "Could not find window control on dialog");
                throw new Exception("Could not find window control on dialog");
            }
        }
 public override void OnLoad(string name, LookingGlassBase lgbase)
 {
     base.OnLoad(name, lgbase);
     m_apiName = "LLLP";
     ModuleParams.AddDefaultParameter(ModuleName + ".Comm.Name", "Comm", "Name of comm module to connect to");
     ModuleParams.AddDefaultParameter(ModuleName + ".APIName", m_apiName, "Name of api for this comm control");
 }
Пример #7
0
        // IModule.OnLoad
        public virtual void OnLoad(string modName, LookingGlassBase lgbase)
        {
            LogManager.Log.Log(LogLevel.DINIT, "AvatarTracker.OnLoad()");
            m_moduleName = modName;
            m_lgb        = lgbase;

            m_avatars = new Dictionary <string, IEntityAvatar>();
        }
        // Called before LookingGlass is initialized
        public RadegastWindow(RadegastInstance rinst, LookingGlassBase lgbase)
        {
            m_radInstance = rinst;
            m_lgb = lgbase;
            m_lgb.AppParams.AddDefaultParameter("RadegastWindow.Renderer.Name", "Renderer", "The renderer we will get UI from");
            m_lgb.AppParams.AddDefaultParameter("RadegastWindow.FramesPerSec", "10", "The rate to throttle frame rendering");

            InitializeComponent();
        }
        // Called before LookingGlass is initialized
        public RadegastWindow(RadegastInstance rinst, LookingGlassBase lgbase)
        {
            m_radInstance = rinst;
            m_lgb         = lgbase;
            m_lgb.AppParams.AddDefaultParameter("RadegastWindow.Renderer.Name", "Renderer", "The renderer we will get UI from");
            m_lgb.AppParams.AddDefaultParameter("RadegastWindow.FramesPerSec", "10", "The rate to throttle frame rendering");

            InitializeComponent();
        }
 // IModule.OnLoad
 public void OnLoad(string name, LookingGlassBase lgbase) {
     m_moduleName = name;
     m_lgb = lgbase;
     m_ui = new UserInterfaceCommon();
     m_ui.OnUserInterfaceKeypress += UI_OnUserInterfaceKeypress;
     m_ui.OnUserInterfaceMouseMove += UI_OnUserInterfaceMouseMove;
     m_ui.OnUserInterfaceMouseButton += UI_OnUserInterfaceMouseButton;
     m_ui.OnUserInterfaceEntitySelected += UI_OnUserInterfaceEntitySelected;
 }
 // IModule.OnLoad
 public virtual void OnLoad(string modName, LookingGlassBase lgbase)
 {
     LogManager.Log.Log(LogLevel.DINIT, "RegionTracker.OnLoad()");
     m_moduleName = modName;
     m_lgb        = lgbase;
     // set the parameter defaults
     ModuleParams.AddDefaultParameter(ModuleName + ".Regions.Enable", "true",
                                      "Whether to make region information available");
     ModuleParams.AddDefaultParameter(ModuleName + ".Renderer.Name", "Renderer",
                                      "Name of renderer module for display of region details");
 }
        // IModule.OnLoad
        public virtual void OnLoad(string modName, LookingGlassBase lgbase)
        {
            LogManager.Log.Log(LogLevel.DINIT, ModuleName + ".OnLoad()");
            m_moduleName = modName;
            m_lgb        = lgbase;

            m_chats = new Queue <ChatEntry>();

            ModuleParams.AddDefaultParameter(m_moduleName + ".Comm.Name", "Comm",
                                             "Name of LLLP comm to connect to");
        }
        // IModule.OnLoad
        public virtual void OnLoad(string modName, LookingGlassBase lgbase)
        {
            m_log.Log(LogLevel.DINIT, ModuleName + ".OnLoad()");
            m_moduleName = modName;
            m_lgb        = lgbase;

            m_lgb.AppParams.AddDefaultParameter("ViewOGL.Renderer.Name", "Renderer", "The renderer we will get UI from");
            m_lgb.AppParams.AddDefaultParameter("ViewOGL.FramesPerSec", "12", "The rate to throttle frame rendering");

            InitializeComponent();
            // glControl.InitializeContexts();
        }
Пример #14
0
        public override void OnLoad(string name, LookingGlassBase lgbase)
        {
            // set up initial variables but don't initialize comm
            OnLoad2(name, lgbase, false);

            try {
                // find the Radegast client
                m_radInstance = (RadegastInstance)m_lgb.OtherManager;
                m_client      = m_radInstance.Client;

                // m_client.Settings.ENABLE_CAPS = true;
                // m_client.Settings.MULTIPLE_SIMS = ModuleParams.ParamBool(ModuleName + ".Settings.MultipleSims");
                m_client.Settings.ALWAYS_DECODE_OBJECTS  = true;
                m_client.Settings.ALWAYS_REQUEST_OBJECTS = true;
                m_client.Settings.OBJECT_TRACKING        = true; // We use our own object tracking system
                m_client.Settings.AVATAR_TRACKING        = true; //but we want to use the libsl avatar system
                // m_client.Settings.SEND_AGENT_APPEARANCE = false;    // for the moment, don't do appearance
                m_client.Settings.PARCEL_TRACKING = true;
                // m_client.Settings.USE_INTERPOLATION_TIMER = false;  // don't need the library helping
                m_client.Settings.SEND_AGENT_UPDATES     = true;
                m_client.Self.Movement.AutoResetControls = false;
                m_client.Self.Movement.UpdateInterval    = 100;
                // m_client.Settings.DISABLE_AGENT_UPDATE_DUPLICATE_CHECK = true;
                m_client.Settings.USE_ASSET_CACHE          = false; // need to turn this off because we store the files
                m_client.Settings.PIPELINE_REQUEST_TIMEOUT = 120 * 1000;
                // m_client.Settings.ASSET_CACHE_DIR = ModuleParams.ParamString(ModuleName + ".Assets.CacheDir");
                // m_client.Settings.ALWAYS_REQUEST_PARCEL_ACL = false;
                // m_client.Settings.ALWAYS_REQUEST_PARCEL_DWELL = false;
                // m_client.Settings.Apply();
                // Crank up the throttle on texture downloads
                m_client.Throttle.Texture = 446000.0f;

                // m_client.Network.OnLogin += new OMV.NetworkManager.LoginCallback(Network_OnLogin);
                // m_client.Network.OnDisconnected += new OMV.NetworkManager.DisconnectedCallback(Network_OnDisconnected);
                // m_client.Network.OnCurrentSimChanged += new OMV.NetworkManager.CurrentSimChangedCallback(Network_OnCurrentSimChanged);
                // m_client.Network.OnEventQueueRunning += new OMV.NetworkManager.EventQueueRunningCallback(Network_OnEventQueueRunning);

                m_client.Network.LoginProgress     += Network_LoginProgress;
                m_client.Network.Disconnected      += Network_Disconnected;
                m_client.Network.SimConnected      += Network_SimConnected;
                m_client.Network.SimChanged        += Network_SimChanged;
                m_client.Network.EventQueueRunning += Network_EventQueueRunning;
            }
            catch (Exception e) {
                m_log.Log(LogLevel.DCOMMDETAIL, "Exception initializing libomv: {0}", e.ToString());
                return;
            }

            // fake like this is the initial teleport
            m_SwitchingSims = true;
        }
Пример #15
0
 public override void OnLoad(string modName, LookingGlassBase lgbase)
 {
     base.OnLoad(modName, lgbase);
     ModuleParams.AddDefaultParameter(m_moduleName + ".Port", "9144",
                                      "Local port used for rest interfaces");
     ModuleParams.AddDefaultParameter(m_moduleName + ".BaseURL", "http://127.0.0.1",
                                      "Base URL for rest interfaces");
     ModuleParams.AddDefaultParameter(m_moduleName + ".CSSLocalURL", "/std/LookingGlass.css",
                                      "CSS file for rest display");
     ModuleParams.AddDefaultParameter(m_moduleName + ".UIContentDir",
                                      Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "./LookingGlassUI"),
                                      "Directory for static HTML content");
     ModuleParams.AddDefaultParameter(m_moduleName + ".Skin", "Default",
                                      "If specified, the subdirectory under StaticContentDir to take files from");
 }
Пример #16
0
        public override void OnLoad(string name, LookingGlassBase lgbase)
        {
            base.OnLoad(name, lgbase);
            ModuleParams.AddDefaultParameter(m_moduleName + ".Renderer.Name", "Renderer", "");
            // todo: make this variable so there can be multiple viewers

            ModuleParams.AddDefaultParameter(m_moduleName + ".Camera.Speed", "5", "Units per second to move camera");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Camera.RotationSpeed", "0.100", "Degrees to rotate camera");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Camera.ServerFar", "300.0", "Far distance sent to server");

            ModuleParams.AddDefaultParameter(m_moduleName + ".Camera.BehindAgent", "4.0", "Distance camera is behind agent");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Camera.AboveAgent", "2.0", "Distance camera is above agent (combined with behind)");

            // m_EntitySlot = EntityBase.AddAdditionSubsystem("VIEWER");        // used by anyone?
        }
        // IModule.OnLoad
        public virtual void OnLoad(string modName, LookingGlassBase lgbase)
        {
            LogManager.Log.Log(LogLevel.DINIT, ModuleName + ".OnLoad()");
            m_moduleName = modName;
            m_lgb        = lgbase;

            // slash happens very early
            InitializeComponent();
            Random rand = new Random();

            string[] ContentLines = new String[30];
            int      line         = 0;

            ContentLines[line++] = LookingGlassBase.ApplicationName + "  " + LookingGlassBase.ApplicationVersion
                                   + "                      http://lookingglassviewer.org/";
            ContentLines[line++] = "";
            ContentLines[line++] = "Copyright (c) 2008-2010 Robert Adams (LookingGlass)";
            ContentLines[line++] = "Copyright (c) 2000-2006 Torus Knot Software Ltd (Ogre)";
            ContentLines[line++] = "Copyright (c) 2001 Peter Dimov and Multi Media Ltd. (Boost)";
            ContentLines[line++] = "Copyright (c) Contributors http://opensimulator.org/ (OpenSimulator)";
            ContentLines[line++] = "Copyright (c) 2007-2009, http://openmetaverse.org (OpenMetaverse)";
            ContentLines[line++] = "Copyright (c) Contributors, http://idealistviewer.org/ (Idealist)";
            ContentLines[line++] = "Copyright (c) 2009 Xavier Verguín González (SkyX)";
            ContentLines[line++] = "Copyright (c) 2009 John Resig (jQuery)";
            ContentLines[line++] = "Copyright (c) 2009, Gareth Watts (SparkLines)";
            ContentLines[line++] = "Copyright (c) 2004-2008 Matthew Holmes, Dan Moorehead, Rob Loach, C.J. Adams-Collier (Prebuild v2.0.4)";
            ContentLines[line++] = "Copyright (c) 2008 Linden Research, Inc. (Avatar mesh/artwork)";
            Array.Resize(ref ContentLines, line);
            this.WindowSplash.Lines = ContentLines;
            this.WindowSplash.Refresh();
            this.WindowSplash.BringToFront();

            Initialize();
            Visible = true;
            Show();
            Update();
        }
Пример #18
0
        // Internal OnLoad that can be used by derived classes
        protected void OnLoad2(string name, LookingGlassBase lgbase, bool shouldInit)
        {
            m_moduleName = name;
            m_lgb = lgbase;
            ModuleParams.AddDefaultParameter(ModuleName + ".Assets.CacheDir",
                    Utilities.GetDefaultApplicationStorageDir(null),
                    "Filesystem location to build the texture cache");
            ModuleParams.AddDefaultParameter(ModuleName + ".Assets.EnableCaps", "true",
                    "Whether to use the caps asset system if available");
            ModuleParams.AddDefaultParameter(ModuleName + ".Assets.OMVResources",
                    "./LookingGlassResources/openmetaverse_data",
                    "Directory for resources used by libopenmetaverse (mostly for appearance)");
            ModuleParams.AddDefaultParameter(ModuleName + ".Assets.NoTextureFilename",
                    Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "./LookingGlassResources/NoTexture.png"),
                    "Filename of texture to display when we can't get the real texture");
            ModuleParams.AddDefaultParameter(ModuleName + ".Assets.NoSculptyFilename",
                    Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "./LookingGlassResources/NoSculpty.png"),
                    "Filename of texture to display when we can't get the real texture");
            ModuleParams.AddDefaultParameter(ModuleName + ".Assets.ConvertPNG", "true",
                    "whether to convert incoming JPEG2000 files to PNG files in the cache");
            ModuleParams.AddDefaultParameter(ModuleName + ".Texture.MaxRequests",
                    "10",
                    "Maximum number of outstanding textures requests");
            ModuleParams.AddDefaultParameter(ModuleName + ".Settings.ShouldHoldChildren",
                    "true",
                    "Whether Comm should hold objects if the parent doesn't exist");

            ModuleParams.AddDefaultParameter(ModuleName + ".Settings.MultipleSims",
                    "false",
                    "Wether to connect to multiple sims");
            ModuleParams.AddDefaultParameter(ModuleName + ".Settings.MovementUpdateInterval",
                    "100",
                    "Milliseconds between movement messages sent to server");
            ModuleParams.AddDefaultParameter(ModuleName + ".Settings.Connection.ApplicationName",
                    LookingGlassBase.ApplicationName,
                    "Application name sent when logging in");
            ModuleParams.AddDefaultParameter(ModuleName + ".Settings.Connection.Version",
                    LookingGlassBase.ApplicationName + " " + LookingGlassBase.ApplicationVersion,
                    "Version stringsent when logging in");

            // This is not the right place for this but there is no World.LL module
            ModuleParams.AddDefaultParameter("World.LL.Agent.PreMoveAvatar",
                    "true",
                    "Whether to move avatar when user types (otherwise wait for server round trip)");
            ModuleParams.AddDefaultParameter("World.LL.Agent.PreMove.RotFudge",
                    "3.0",
                    "Degrees to rotate avatar when user turns (float)");
            ModuleParams.AddDefaultParameter("World.LL.Agent.PreMove.FlyFudge",
                    "2.5",
                    "Meters to move avatar when moves forward when flying (float)");
            ModuleParams.AddDefaultParameter("World.LL.Agent.PreMove.RunFudge",
                    "1.5",
                    "Meters to move avatar when moves forward when running (float)");
            ModuleParams.AddDefaultParameter("World.LL.Agent.PreMove.MoveFudge",
                    "0.4",
                    "Meters to move avatar when moves forward when walking (float)");

            if (shouldInit) InitConnectionFramework();
        }
Пример #19
0
        public override void OnLoad(string name, LookingGlassBase lgbase)
        {
            // set up initial variables but don't initialize comm
            OnLoad2(name, lgbase, false);

            try {
            // find the Radegast client
            m_radInstance = (RadegastInstance)m_lgb.OtherManager;
            m_client = m_radInstance.Client;

            // m_client.Settings.ENABLE_CAPS = true;
            // m_client.Settings.MULTIPLE_SIMS = ModuleParams.ParamBool(ModuleName + ".Settings.MultipleSims");
            m_client.Settings.ALWAYS_DECODE_OBJECTS = true;
            m_client.Settings.ALWAYS_REQUEST_OBJECTS = true;
            m_client.Settings.OBJECT_TRACKING = true; // We use our own object tracking system
            m_client.Settings.AVATAR_TRACKING = true; //but we want to use the libsl avatar system
            // m_client.Settings.SEND_AGENT_APPEARANCE = false;    // for the moment, don't do appearance
            m_client.Settings.PARCEL_TRACKING = true;
            // m_client.Settings.USE_INTERPOLATION_TIMER = false;  // don't need the library helping
            m_client.Settings.SEND_AGENT_UPDATES = true;
            m_client.Self.Movement.AutoResetControls = false;
            m_client.Self.Movement.UpdateInterval = 100;
            // m_client.Settings.DISABLE_AGENT_UPDATE_DUPLICATE_CHECK = true;
            m_client.Settings.USE_ASSET_CACHE = false;      // need to turn this off because we store the files
            m_client.Settings.PIPELINE_REQUEST_TIMEOUT = 120 * 1000;
            // m_client.Settings.ASSET_CACHE_DIR = ModuleParams.ParamString(ModuleName + ".Assets.CacheDir");
            // m_client.Settings.ALWAYS_REQUEST_PARCEL_ACL = false;
            // m_client.Settings.ALWAYS_REQUEST_PARCEL_DWELL = false;
            // m_client.Settings.Apply();
            // Crank up the throttle on texture downloads
            m_client.Throttle.Texture = 446000.0f;

            // m_client.Network.OnLogin += new OMV.NetworkManager.LoginCallback(Network_OnLogin);
            // m_client.Network.OnDisconnected += new OMV.NetworkManager.DisconnectedCallback(Network_OnDisconnected);
            // m_client.Network.OnCurrentSimChanged += new OMV.NetworkManager.CurrentSimChangedCallback(Network_OnCurrentSimChanged);
            // m_client.Network.OnEventQueueRunning += new OMV.NetworkManager.EventQueueRunningCallback(Network_OnEventQueueRunning);

            m_client.Network.LoginProgress += Network_LoginProgress;
            m_client.Network.Disconnected += Network_Disconnected;
            m_client.Network.SimConnected += Network_SimConnected;
            m_client.Network.SimChanged += Network_SimChanged;
            m_client.Network.EventQueueRunning += Network_EventQueueRunning;
            }
            catch (Exception e) {
            m_log.Log(LogLevel.DCOMMDETAIL, "Exception initializing libomv: {0}", e.ToString());
            return;
            }

            // fake like this is the initial teleport
            m_SwitchingSims = true;
        }
Пример #20
0
        // IModule.OnLoad
        public void OnLoad(string modName, LookingGlassBase lgbase)
        {
            LogManager.Log.Log(LogLevel.DINIT, ModuleName + ".OnLoad()");
            m_moduleName = modName;
            m_lgb = lgbase;
            ModuleParams.AddDefaultParameter(m_moduleName + ".InputSystem.Name", "WindowUI",
                    "Name of the input module");

            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Camera.Far", "2048.0",
                    "Far clip for camera");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Global.Ambient", "<0.4,0.4,0.4>",
                    "Global ambient setting");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Sun.Ambient", "<0.4,0.4,0.4>",
                    "Ambient lighting for the sun");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Sun.Specular", "<0.8,0.8,0.8>",
                    "Specular lighting for the sun");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Sun.Diffuse", "<1.0,1.0,1.0>",
                    "Diffuse lighting for the sun");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Moon.Ambient", "<0.4,0.4,0.4>",
                    "Ambient lighting for the sun");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Moon.Specular", "<0.8,0.8,0.8>",
                    "Specular lighting for the sun");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Moon.Diffuse", "<0.5, 0.5, 0.8>",
                    "Diffuse lighting for the sun");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Avatar.Color", "<0.4,0.4,0.8>",
                    "Color of avatar sphere");
            ModuleParams.AddDefaultParameter(m_moduleName + ".OGL.Avatar.Transparancy", "0.6",
                    "Transparancy of avatar sphere");
        }
 // IModule.OnLoad
 public virtual void OnLoad(string modName, LookingGlassBase lgbase)
 {
     LogManager.Log.Log(LogLevel.DINIT, ModuleName + ".OnLoad()");
     m_moduleName = modName;
     m_lgb        = lgbase;
 }
Пример #22
0
        public override void OnLoad(string name, LookingGlassBase lgbase)
        {
            base.OnLoad(name, lgbase);
            ModuleParams.AddDefaultParameter(m_moduleName + ".Renderer.Name", "Renderer", "");
            // todo: make this variable so there can be multiple viewers

            ModuleParams.AddDefaultParameter(m_moduleName + ".Camera.Speed", "5", "Units per second to move camera");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Camera.RotationSpeed", "0.100", "Degrees to rotate camera");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Camera.ServerFar", "300.0", "Far distance sent to server");

            ModuleParams.AddDefaultParameter(m_moduleName + ".Camera.BehindAgent", "4.0", "Distance camera is behind agent");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Camera.AboveAgent", "2.0", "Distance camera is above agent (combined with behind)");

            // m_EntitySlot = EntityBase.AddAdditionSubsystem("VIEWER");        // used by anyone?
        }
Пример #23
0
 public override void OnLoad(string name, LookingGlassBase lgbase) {
     base.OnLoad(name, lgbase);
     m_instance = this;      // there is only one world
     m_regionList = new List<RegionContextBase>();
     ModuleParams.AddDefaultParameter(m_moduleName + ".Communication", "Comm", "Communication to connect to");
 }
Пример #24
0
        // IModule.OnLoad
        public virtual void OnLoad(string modName, LookingGlassBase lgbase)
        {
            LogManager.Log.Log(LogLevel.DINIT, ModuleName + ".OnLoad()");
            m_moduleName = modName;
            m_lgb = lgbase;

            m_chats = new Queue<ChatEntry>();

            ModuleParams.AddDefaultParameter(m_moduleName + ".Comm.Name", "Comm",
                    "Name of LLLP comm to connect to");
        }
Пример #25
0
 // IModule.OnLoad
 public virtual void OnLoad(string modName, LookingGlassBase lgbase)
 {
     LogManager.Log.Log(LogLevel.DINIT, ModuleName + ".OnLoad()");
     m_moduleName = modName;
     m_lgb = lgbase;
 }
 // IModule.OnLoad
 public virtual void OnLoad(string modName, LookingGlassBase lgbase)
 {
     LogManager.Log.Log(LogLevel.DINIT, "RegionTracker.OnLoad()");
     m_moduleName = modName;
     m_lgb = lgbase;
     // set the parameter defaults
     ModuleParams.AddDefaultParameter(ModuleName + ".Regions.Enable", "true",
             "Whether to make region information available");
     ModuleParams.AddDefaultParameter(ModuleName + ".Renderer.Name", "Renderer",
             "Name of renderer module for display of region details");
 }
Пример #27
0
 public ModuleManager(LookingGlassBase lgbase)
 {
     m_instance = this;
     m_modules  = new Dictionary <string, IModule>();
     m_lgb      = lgbase;
 }
Пример #28
0
        public override void OnLoad(string name, LookingGlassBase lgbase)
        {
            base.OnLoad(name, lgbase);
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.InputSystem.Name",
                    "OgreUI",
                    "Module to handle user IO on the rendering screen");

            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Name", "LookingGlass",
                    "Name of the Ogre resources to load");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.SkyboxName", "LookingGlass/CloudyNoonSkyBox",
                    "Name of the skybox resource to use");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.ShadowTechnique", "none",
                    "Shadow technique: none, texture-additive, texture-modulative, stencil-modulative, stencil-additive");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.ShadowFarDistance", "400",
                    "Integer units of distance within which to do shadows (mul by magnification)");
            // cp.AddParameter(m_moduleName + ".Ogre.Renderer", "Direct3D9 Rendering Subsystem",
            //             "Name of the rendering subsystem to use");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Renderer", "OpenGL Rendering Subsystem",
                    "Name of the rendering subsystem to use");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.VideoMode", "800 x 600@ 32-bit colour",
                    "Initial window size");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.FramePerSecMax", "30",
                    "Maximum number of frames to display per second");
            ModuleParams.AddDefaultParameter(m_moduleName + ".ShouldRenderOnMainThread", "false",
                    "True if ogre rendering otherwise someone has to call RenderOneFrame");

            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.PluginFilename", "plugins.cfg",
                    "File that lists Ogre plugins to load");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.ResourcesFilename", "resources.cfg",
                    "File that lists the Ogre resources to load");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.DefaultNumMipmaps", "2",
                    "Default number of mip maps created for a texture (usually 6)");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.CacheDir", Utilities.GetDefaultApplicationStorageDir(null),
                    "Directory to store cached meshs, textures, etc");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.PreLoadedDir",
                    System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "./LookingGlassResources/Preloaded/"),
                    "Directory to for preloaded textures, etc");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.DefaultTerrainMaterial",
                    "LookingGlass/DefaultTerrainMaterial",
                    "Material applied to terrain");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Ocean.Processor",
                    "none",
                    "The processing routine to create the ocean. Either 'none' or 'hydrax'");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.OceanMaterialName",
                    "LookingGlass/Ocean",
                    "The ogre name of the ocean texture");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.DefaultMeshFilename",
                    System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "./LookingGlassResources/LoadingShape.mesh"),
                    "Filename of the default shape found in the cache dir");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.DefaultTextureFilename",
                    System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "./LookingGlassResources/LoadingTexture.png"),
                    "Filename of the default texture found in the cache dir");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.DefaultTextureResourceName",
                    "LoadingTexture.png",
                    "Resource name of  the default texture");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.WhiteTextureResourceName",
                    "Preload/" + OMV.Primitive.TextureEntry.WHITE_TEXTURE.ToString().Substring(0,1)
                            + "/" + OMV.Primitive.TextureEntry.WHITE_TEXTURE.ToString(),
                    "Resource name of a white texture used as default base color");

            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.LL.SceneMagnification", "1",
                    "Magnification of LL coordinates into Ogre space");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.LL.RenderInfoMaterialCreate", "true",
                    "Create materials while gathering mesh generation info (earlier than mesh creation)");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.LL.EarlyMaterialCreate", "false",
                    "Create materials while creating mesh rather than waiting");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.LL.DefaultAvatarMesh",
                    // "Preload/00000000-0000-2222-3333-112200000003",
                    "", // read definition from LAD file
                    "Entity name of mesh to use for avatars");

            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.BetweenFrame.WorkMilliSecondsMax", "300",
                    "Cost of queued C++ work items to do between each frame");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.BetweenFrame.Costs.Total", "200",
                    "The total cost of C# operations to do between each frame");

            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.SerializeMaterials", "false",
                    "Write out materials to files (replace with DB someday)");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.SerializeMeshes", "true",
                    "Write out meshes to files");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.ForceMeshRebuild", "false",
                    "True if to force the generation a mesh when first rendered (don't rely on cache)");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.PrebuildMesh", "true",
                    "True if to make sure the mesh exists before creating the scene node");
            ModuleParams.AddDefaultParameter(m_moduleName + ".ShouldShareMeshes", "false",
                    "True if to share meshes with similar characteristics");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.UseShaders", "true",
                    "Whether to use the new technique of using GPU shaders");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.CollectOgreStats", "true",
                    "Whether to collect detailed Ogre stats and make available to web");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.ShouldQueueMeshOperations", "true",
                    "True if to try and use threads and delayed mesh load and unload operations");

            ModuleParams.AddDefaultParameter(m_moduleName + ".Avatar.Mesh.InfoDir", "./LookingGlassResources/openmetaverse_data",
                    "Directory containing avatar description information");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Avatar.Mesh.Description", "avatar_lad.xml",
                    "File containing detailed avatar mesh description");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Avatar.Mesh.DescriptionDir", "./LookingGlassResources/character",
                    "Directory with detailed avatar mesh description info");

            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Sky", "Default",
                    "Name of the key system to use");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.SkyX.LightingHDR", "true",
                    "Use high resolution lighting shaders");

            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Camera.NearClip", "2.0",
                    "Initial camera near clip distance");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Camera.FarClip", "30000.0",
                    "Initial camera far clip distance");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Ambient.Scene", "<0.4,0.4,0.4>",
                    "color value for scene initial ambient lighting");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Ambient.Material", "<0.4,0.4,0.4>",
                    "color value for material ambient lighting");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Sun.Color", "<1.0,1.0,1.0>",
                    "Color of light from the sun at noon");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Moon.Color", "<0.6,0.6,0.8>",
                    "Color of light from the moon");

            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Visibility.Processor", "FrustrumDistance",
                    "Name of the culling plugin to use ('FrustrumDistance', 'VariableFrustDist', 'none')");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Visibility.Cull.Frustrum", "false",
                    "whether to cull (unload) objects if not visible in camera frustrum");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Visibility.Cull.Distance", "false",
                    "whether to cull (unload) objects depending on distance from camera");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Visibility.Cull.Meshes", "true",
                    "unload culled object meshes");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Visibility.Cull.Textures", "true",
                    "unload culled textures");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Visibility.MaxDistance", "200",
                    "the maximum distance to see any entites (far clip)");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Visibility.MinDistance", "30",
                    "below this distance, everything is visible");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Visibility.OnlyLargeAfter", "120",
                    "After this distance, only large things are visible");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Visibility.Large", "8",
                    "How big is considered 'large' for 'OnlyLargeAfter' calculation");
            ModuleParams.AddDefaultParameter(m_moduleName + ".Ogre.Visibility.MeshesReloadedPerFrame", "80",
                    "When reloading newly visible meshes, how many to load per frame");

            // some counters and intervals to see how long things take
            m_stats = new StatisticManager(m_moduleName);
            m_statMaterialsRequested = m_stats.GetCounter("MaterialsRequested");
            m_statMeshesRequested = m_stats.GetCounter("MeshesRequested");
            m_statTexturesRequested = m_stats.GetCounter("TexturesRequested");
            m_statSharableTotal = m_stats.GetCounterValue("TotalMeshes", delegate() { return (long)prebuiltMeshes.Count; });
            m_statRequestedMeshes = m_stats.GetCounterValue("RequestedMeshes", delegate() { return (long)m_requestedMeshes.Count; });
            m_statRequestedMeshes = m_stats.GetCounterValue("PrebuiltMeshes", delegate() {
            return (long)RenderPrim.prebuiltMeshes.Count;
            });
            m_statShareInstances = m_stats.GetCounter("TotalSharedInstances");

            // renderer keeps rendering specific data in an entity's addition/subsystem slots
            AddSceneNodeName = EntityBase.AddAdditionSubsystem(RendererOgre.AddSceneNodeNameName);
            AddRegionSceneNode = EntityBase.AddAdditionSubsystem(RendererOgre.AddRegionSceneNodeName);
        }
Пример #29
0
 public virtual void OnLoad(string name, LookingGlassBase lgbase)
 {
     OnLoad2(name, lgbase, true);
 }
Пример #30
0
        // IModule.OnLoad
        public virtual void OnLoad(string modName, LookingGlassBase lgbase)
        {
            LogManager.Log.Log(LogLevel.DINIT, ModuleName + ".OnLoad()");
            m_moduleName = modName;
            m_lgb = lgbase;

            // slash happens very early
            InitializeComponent();
            Random rand = new Random();

            string[] ContentLines = new String[30];
            int line = 0;
            ContentLines[line++] = LookingGlassBase.ApplicationName + "  " + LookingGlassBase.ApplicationVersion
            + "                      http://lookingglassviewer.org/";
            ContentLines[line++] = "";
            ContentLines[line++] = "Copyright (c) 2008-2010 Robert Adams (LookingGlass)";
            ContentLines[line++] = "Copyright (c) 2000-2006 Torus Knot Software Ltd (Ogre)";
            ContentLines[line++] = "Copyright (c) 2001 Peter Dimov and Multi Media Ltd. (Boost)";
            ContentLines[line++] = "Copyright (c) Contributors http://opensimulator.org/ (OpenSimulator)";
            ContentLines[line++] = "Copyright (c) 2007-2009, http://openmetaverse.org (OpenMetaverse)";
            ContentLines[line++] = "Copyright (c) Contributors, http://idealistviewer.org/ (Idealist)";
            ContentLines[line++] = "Copyright (c) 2009 Xavier Verguín González (SkyX)";
            ContentLines[line++] = "Copyright (c) 2009 John Resig (jQuery)";
            ContentLines[line++] = "Copyright (c) 2009, Gareth Watts (SparkLines)";
            ContentLines[line++] = "Copyright (c) 2004-2008 Matthew Holmes, Dan Moorehead, Rob Loach, C.J. Adams-Collier (Prebuild v2.0.4)";
            ContentLines[line++] = "Copyright (c) 2008 Linden Research, Inc. (Avatar mesh/artwork)";
            Array.Resize(ref ContentLines, line);
            this.WindowSplash.Lines = ContentLines;
            this.WindowSplash.Refresh();
            this.WindowSplash.BringToFront();

            Initialize();
            Visible = true;
            Show();
            Update();
        }
        // IModule.OnLoad
        public virtual void OnLoad(string modName, LookingGlassBase lgbase)
        {
            LogManager.Log.Log(LogLevel.DINIT, "AvatarTracker.OnLoad()");
            m_moduleName = modName;
            m_lgb = lgbase;

            m_avatars = new Dictionary<string, IEntityAvatar>();
        }
Пример #32
0
        // IModule.OnLoad
        public virtual void OnLoad(string modName, LookingGlassBase lgbase)
        {
            m_log.Log(LogLevel.DINIT, ModuleName + ".OnLoad()");
            m_moduleName = modName;
            m_lgb = lgbase;

            m_lgb.AppParams.AddDefaultParameter("ViewOGL.Renderer.Name", "Renderer", "The renderer we will get UI from");
            m_lgb.AppParams.AddDefaultParameter("ViewOGL.FramesPerSec", "12", "The rate to throttle frame rendering");

            InitializeComponent();
            // glControl.InitializeContexts();
        }
Пример #33
0
        public static void Main(string[] args)
        {
            LookingGlassBase LGB = new LookingGlassBase();

            try {
            m_Parameters = ParseArguments(args, false);
            }
            catch (Exception e) {
            throw new Exception("Could not parse command line parameters: " + e.ToString());
            }
            foreach (KeyValuePair<string, string> kvp in m_Parameters)
            {
            switch (kvp.Key)
            {
                case FIRST_PARAM:
                    break;
                case "-first":
                case "--first":
                    LGB.AppParams.AddOverrideParameter("User.Firstname", kvp.Value);
                    break;
                case "-last":
                case "--last":
                    LGB.AppParams.AddOverrideParameter("User.Lastname", kvp.Value);
                    break;
                case "-password":
                case "--password":
                    LGB.AppParams.AddOverrideParameter("User.Password", kvp.Value);
                    break;
                case "--grid":
                    LGB.AppParams.AddOverrideParameter("User.Grid", kvp.Value);
                    break;
                case "--loginuri":
                    LGB.AppParams.AddOverrideParameter("User.LoginURI", kvp.Value);
                    break;
                case "--configFile":
                    LGB.AppParams.AddOverrideParameter("Settings.File", kvp.Value);
                    break;
                case "--modulesFile":
                    LGB.AppParams.AddOverrideParameter("Settings.Modules", kvp.Value);
                    break;
                case "--cache":
                    LGB.AppParams.AddOverrideParameter("Comm.Assets.CacheDir", kvp.Value);
                    break;
                case "--param":
                    int splitPlace = kvp.Value.IndexOf(':');
                    if (splitPlace > 0) {
                        LGB.AppParams.AddOverrideParameter(
                                kvp.Value.Substring(0, splitPlace - 1).Trim(),
                                kvp.Value.Substring(splitPlace).Trim());
                    }
                    else {
                        Console.Out.WriteLine("ERROR: Could not parse param value: " + kvp.Value);
                        Invocation();
                        return;
                    }
                    break;
                case "--debug":
                    break;
                case ERROR_PARAM:
                    // if we get here, the parser found an error
                    Console.WriteLine("Parameter error: " + kvp.Value);
                    Console.Write(Invocation());
                    return;
                default:
                    Console.WriteLine("ERROR: UNKNOWN PARAMETER: " + kvp.Key);
                    Console.Write(Invocation());
                    return;
            }
            }

            LookingGlassMain LGApplicationInstance = new LookingGlassMain();
            LGApplicationInstance.LGApplicationInstance = LGApplicationInstance;

            Application.Run(LGApplicationInstance);
        }