public static CardboardProfile GetKnownProfile(ScreenSizes screenSize, DeviceTypes deviceType) { Screen screen; switch (screenSize) { case ScreenSizes.Nexus6: screen = Nexus6; break; case ScreenSizes.GalaxyS6: screen = GalaxyS6; break; case ScreenSizes.GalaxyNote4: screen = GalaxyNote4; break; case ScreenSizes.LGG3: screen = LGG3; break; case ScreenSizes.iPhone4: screen = iPhone4; break; case ScreenSizes.iPhone5: screen = iPhone5; break; case ScreenSizes.iPhone6: screen = iPhone6; break; case ScreenSizes.iPhone6p: screen = iPhone6p; break; default: screen = Nexus5; break; } Device device; switch (deviceType) { case DeviceTypes.CardboardMay2015: device = CardboardMay2015; break; default: device = CardboardJun2014; break; } return(new CardboardProfile { screen = screen, device = device }); }
public void Init(DriverTypes driver, ScreenSizes windowSize) { Driver = GetDriver(driver); Driver.Manage().Window.Size = new System.Drawing.Size( EnumsHelper.GetWidth(windowSize), EnumsHelper.GetHeight(windowSize)); var l = Driver.Manage().Window.Size.Height; var fl = Driver.Manage().Window.Size.Width; }
public static CardboardProfile GetKnownProfile(ScreenSizes screenSize, DeviceTypes deviceType) { Screen screen; switch (screenSize) { default: screen = Nexus5; break; } Device device; switch (deviceType) { default: device = CardboardV1; break; } return new CardboardProfile { screen = screen, device = device }; }
/// Returns a profile with the given parameters. public static NxrProfile GetKnownProfile(ScreenSizes screenSize, ViewerTypes deviceType) { Screen screen; switch (screenSize) { case ScreenSizes.Nexus6: screen = Nexus6; break; case ScreenSizes.GalaxyS6: screen = GalaxyS6; break; case ScreenSizes.GalaxyNote4: screen = GalaxyNote4; break; case ScreenSizes.LGG3: screen = LGG3; break; default: screen = Nexus5; break; } Viewer device; switch (deviceType) { case ViewerTypes.CardboardMay2015: device = CardboardMay2015; break; case ViewerTypes.GoggleTechC1Glass: device = GoggleTechC1Glass; break; default: device = CardboardJun2014; break; } return(new NxrProfile { screen = screen, viewer = device }); }
public static CardboardProfile GetKnownProfile(ScreenSizes screenSize, DeviceTypes deviceType) { Screen screen; switch (screenSize) { default: screen = Nexus5; break; } Device device; switch (deviceType) { default: device = CardboardV1; break; } return(new CardboardProfile { screen = screen, device = device }); }
/// Returns a CardboardProfile with the given parameters. public static CardboardProfile GetKnownProfile(ScreenSizes screenSize, DeviceTypes deviceType) { Screen screen; switch (screenSize) { case ScreenSizes.Nexus6: screen = Nexus6; break; case ScreenSizes.GalaxyS6: screen = GalaxyS6; break; case ScreenSizes.GalaxyNote4: screen = GalaxyNote4; break; case ScreenSizes.LGG3: screen = LGG3; break; case ScreenSizes.iPhone4: screen = iPhone4; break; case ScreenSizes.iPhone5: screen = iPhone5; break; case ScreenSizes.iPhone6: screen = iPhone6; break; case ScreenSizes.iPhone6p: screen = iPhone6p; break; default: screen = Nexus5; break; } Device device; switch (deviceType) { case DeviceTypes.CardboardMay2015: device = CardboardMay2015; break; case DeviceTypes.GoggleTechC1Glass: device = GoggleTechC1Glass; break; default: device = CardboardJun2014; break; } return new CardboardProfile { screen = screen, device = device }; }
public Display(ScreenSizes _screenSize, Colours _colour) { ScreenSize = _screenSize; Colour = _colour; }
//Generate camera preview gizmo. private void OnDrawGizmos() { //Only draw if 2D mode. if (SceneView.currentDrawingSceneView != null && !SceneView.currentDrawingSceneView.in2DMode) { return; } if (EditorPrefs.HasKey("ImmersiveCameraScreenSize")) { screenSize = (ScreenSizes)EditorPrefs.GetInt("ImmersiveCameraScreenSize"); } if (EditorPrefs.HasKey("ImmersiveCameraLayout")) { layout = (SurfacePosition)EditorPrefs.GetInt("ImmersiveCameraLayout"); } //Check if camera settings have changed. if (_screenSize != screenSize || _layout != layout || _cagType != cagType) { _layout = layout; _screenSize = screenSize; _cagType = cagType; //Calculate new Surface Information rects = new List <Rect>(); var surfacePositions = GetSurfacesFromLayout(layout); var surfaceRects = GenerateSurfaceRectsInEditor(surfacePositions); GenerateSurfacesInfo(surfacePositions, surfaceRects); //Calculate new cameras size and position. for (int i = 0; i < walls.Count; i++) { var surface = walls[i]; Rect rect = new Rect(); rect.size = new Vector2(surface.aspectRatio, height * 2); if (cagType == CAGType.Interior) { rect.center = GetWallCameraPositionCAGI(surface); } else if (cagType == CAGType.Exterior) { rect.center = GetWallCameraPositionCAGE(surface); } rects.Add(rect); } } //Draw camera frustrums. float xPos = transform.position.x; float yPos = transform.position.y; var zPos = transform.position.z + mainCamera.farClipPlane; Gizmos.color = Color.white; for (int i = 0; i < rects.Count; i++) { var rect = rects[i]; Gizmos.DrawLine(new Vector3(xPos + rect.xMin, yPos + rect.yMax, zPos), new Vector3(xPos + rect.xMax, yPos + rect.yMax, zPos)); Gizmos.DrawLine(new Vector3(xPos + rect.xMin, yPos + rect.yMin, zPos), new Vector3(xPos + rect.xMax, yPos + rect.yMin, zPos)); Gizmos.DrawLine(new Vector3(xPos + rect.xMin, yPos + rect.yMin, zPos), new Vector3(xPos + rect.xMin, yPos + rect.yMax, zPos)); Gizmos.DrawLine(new Vector3(xPos + rect.xMax, yPos + rect.yMin, zPos), new Vector3(xPos + rect.xMax, yPos + rect.yMax, zPos)); } }