public ScientificCamera(CameraTypes cameraType, double width, double height) { Name = "Scientific Camera: " + count++; this.lastHeight = width; this.lastHeight = height; IPerspectiveCamera perspectiveCamera = this; perspectiveCamera.FieldOfView = 60f; perspectiveCamera.AspectRatio = width / height; perspectiveCamera.Near = 0.01; perspectiveCamera.Far = 10000; const int factor = 100; IOrthoCamera orthoCamera = this; orthoCamera.Left = -width / 2 / factor; orthoCamera.Right = width / 2 / factor; orthoCamera.Bottom = -height / 2 / factor; orthoCamera.Top = height / 2 / factor; orthoCamera.Near = -10000; orthoCamera.Far = 10000; this.Target = defaultTarget; this.Position = defaultPosition; this.UpVector = defaultUpVector; this.CameraType = cameraType; }
public void changeCameraType(CameraTypes type) { if(type == CameraTypes.SINGLE_PERSON_CAMERA) transitionToSinglePersonCamera(); if(type == CameraTypes.THIRD_PERSON_CAMERA) transitionToThirdPersonCamera(); }
private void SharpGLForm_Load(object sender, EventArgs e) { var cameraTypes = new CameraTypes[] { CameraTypes.Ortho, CameraTypes.Perspecitive }; foreach (var item in cameraTypes) { this.cmbCameraType.Items.Add(item); } }
public ComponentCamera(CameraTypes pCameraType, float pFov, float pRenderLong, float pRenderShort, float pWidth, float pHeight, Vector3 pOffset) { CameraType = pCameraType; Changed = true; Projection = Matrix4.CreatePerspectiveFieldOfView(MathHelper.DegreesToRadians(pFov), pWidth / pHeight, pRenderShort, pRenderLong); Num = NUM_CAMS; Offset = pOffset; NUM_CAMS++; }
public void Initialize(CameraTypes cameraType, RectTransform container, Vector2Int resolution) { _cameraType = cameraType; _container = container; _resolution = resolution; _containerResolutionRatio = _container.rect.size / _resolution; SetSubscription(); }
/// <summary> /// Возвращает идентификационно имя камеры определнного типа /// </summary> public string GetName(CameraTypes cameraType) { var info = identificationData.FirstOrDefault(d => d.cameraType == cameraType); if (info == default) { throw new Exception($"Can't find CameraInfo of \"{cameraType.GetDescription()}\" CameraType"); } return(info.nameIdentity); }
private void ChangeCamera(CameraTypes type) { if (type == CameraTypes.Free) { SetCameraEnable(FreeCamera); } else if (type == CameraTypes.Front) { SetCameraEnable(FrontCamera); } else if (type == CameraTypes.Back) { SetCameraEnable(BackCamera); } CurrentSettings.CameraType = type; }
void Update() { GetComponent <Camera>().orthographic = false; if (Input.GetKeyDown(KeyCode.C)) { switch (cameraType) { case CameraTypes.Following: cameraType = CameraTypes.playerChangable; break; case CameraTypes.playerChangable: cameraType = CameraTypes.Static; break; case CameraTypes.Static: cameraType = CameraTypes.FollowingOrtho; break; case CameraTypes.FollowingOrtho: cameraType = CameraTypes.Following; break; } } switch (cameraType) { case CameraTypes.Following: Following(); break; case CameraTypes.playerChangable: playerChangable(); break; case CameraTypes.Static: Static(); break; case CameraTypes.FollowingOrtho: FollowingOrtho(); break; } }
public void ChangeCamera(CameraTypes type) { if (type == CameraTypes.Free) { SetCameraEnable(FreeCamera); } else if (type == CameraTypes.Front) { SetCameraEnable(FrontCamera); } else if (type == CameraTypes.Back) { SetCameraEnable(BackCamera); } else if (type == CameraTypes.PositionFixed) { SetCameraEnable(PositionFixedCamera); } Settings.Current.CameraType = type; }
public CameraTypes UpdateCameraType(CameraTypes cameraTypes) { return(_cameraTypesDal.Update(cameraTypes)); }
public void DeleteCameraType(CameraTypes cameraTypes) { _cameraTypesDal.Delete(cameraTypes); }
public CameraTypes AddCameraType(CameraTypes cameraTypes) { return(_cameraTypesDal.Add(cameraTypes)); }
public CameraState(CameraTypes type) : this() { Type = type; }
public static BaseCamera Create(CameraTypes type, params object[] args) { return((BaseCamera)Activator.CreateInstance(CameraTypes[type], args)); }
public void Initialize(CameraTypes cameraType) { SetSubscription(); _cameraType = cameraType; _webCamFrameRateWait = new WaitForSeconds(1f / Params.WEB_CAM_FPS); }