Ejemplo n.º 1
0
        public static CallingDevices GetCallingDevice(string deviceName)
        {
            CallingDevices callingDevice = CallingDevices.PC;

            if (!string.IsNullOrWhiteSpace(deviceName))
            {
                if (deviceName.ToLower() == CallingDevices.HoloLens.ToString().ToLower())
                {
                    return(CallingDevices.HoloLens);
                }
                if (deviceName.ToLower() == CallingDevices.MR.ToString().ToLower())
                {
                    return(CallingDevices.MR);
                }
                if (deviceName.ToLower() == CallingDevices.Unity_Editor.ToString().ToLower())
                {
                    return(CallingDevices.Unity_Editor);
                }
                if (deviceName.ToLower() == CallingDevices.OSX.ToString().ToLower())
                {
                    return(CallingDevices.OSX);
                }
            }
            return(callingDevice);
        }
Ejemplo n.º 2
0
        public WebPanelLayout(CallingDevices callingApp)
        {
            double  transparancy_BG         = 0.6;
            double  transparancy_FG         = 0.2;
            Vector3 bottomPanelDiffuceColor = new Vector3(0.1, 0.1, 0);

            if (callingApp == CallingDevices.HoloLens)
            {
                bottomPanelDiffuceColor = new Vector3(0.4, 0.4, 0);
            }
            TopPanelBackGround    = new X3DMaterial("Menu_Panel_BG", bottomPanelDiffuceColor, transparancy_BG);
            BottomPanelForground  = new X3DMaterial("bottom_panel_FG", bottomPanelDiffuceColor, transparancy_FG);
            BottomPanelBackGround = new X3DMaterial("Menu_Panel_BG", bottomPanelDiffuceColor, transparancy_BG);
            BottomPanelText       = new X3DMaterial("Menu_FrontPanel_Txt", new Vector3());
        }
Ejemplo n.º 3
0
        protected void ReadRequestHeaders()
        {
            CallingApp = Calc.GetCallingDevice(Request.Headers[RH_Calling_Device]);
            UserAgent  = Request.Headers[RH_USER_AGENT];
            if (!string.IsNullOrWhiteSpace(UserAgent))
            {
                List <string> uaList   = UserAgent.Split(Convert.ToChar(" ")).ToList <string>();
                var           slamItem = uaList.Find(x => x.ToLower().Contains("vslam"));
                if (!string.IsNullOrWhiteSpace(slamItem))
                {
                    var parts = slamItem.Split(Convert.ToChar("/"));
                    if (parts.Length > 1)
                    {
                        float.TryParse(parts[1], out SlamVersion);
                    }
                }
            }
            var tzo = Request.Headers[RH_Timezone_Offset];

            if (tzo != null)
            {
                int.TryParse(tzo, out Timezone_Offset);
            }
        }
Ejemplo n.º 4
0
        public void CircleHalfPanel(X3DTransform parent, List <IWebSceneProps> webScenePropes, int pageNo, CallingDevices callingApp, out bool hasNextPage, WebPanelLayout webPanelLayout = null)
        {
            int counter = 0;

            counter     = -pageNo * PageSize;
            hasNextPage = false;
            float   angle    = 0;
            Vector3 pos      = null;
            int     lcounter = 0;

            if (webPanelLayout == null)
            {
                webPanelLayout = new WebPanelLayout(callingApp);
            }
            foreach (var website in webScenePropes)
            {
                string webUrl = website.Url;
                if ((!string.IsNullOrWhiteSpace(webUrl) && webUrl.ToLower() != "http://www.v-slam.org/index.aspx") || HasNewSlamVersion)
                {
                    if (counter >= 0)
                    {
                        var w = CreateBusinesWebsite(website, webPanelLayout);
                        GetProps(lcounter, out angle, out pos);
                        w.Translation   = pos;
                        w.EulerRotation = new Vector3(0, angle, 0);

                        parent.Children.Add(w);
                        lcounter++;
                    }
                    counter++;
                    if (counter > PageSize - 1)
                    {
                        hasNextPage = true;
                        break;
                    }
                }
            }
        }