void dataToParam(PlayCamShotData data) { setCamCenter = data.setCamCenter; centerPoint = data.centerPoint; setCamPos = data.setCamPos; newCamPos = data.newCamPos; setCamRot = data.setCamRot; newCamRot = data.newCamRot; fov = data.fov; motionTime = data.motionTime; newMotionType = data.newMotionType; nowMotionType = data.nowMotionType; easingType = data.easingType; }
private void selectCam(camType index) { switch (index) { case camType.WebCam: Radio_webcam.IsChecked = true; Radio_PTcam.IsChecked = false; break; case camType.PointGreyCam: Radio_webcam.IsChecked = false; Radio_PTcam.IsChecked = true; break; } }
void Update() { if (Input.GetKeyDown(key_2D)) { activeCamera = camType.Cam2D; ChangeCam(); } if (Input.GetKeyDown(key_Iso)) { activeCamera = camType.CamIso; ChangeCam(); } if (Input.GetKeyDown(key_3D)) { activeCamera = camType.Cam3D; ChangeCam(); } }
private static void connectRoutine_doWork(object sender, DoWorkEventArgs e) { connectRoutine.ReportProgress(0); ct = (camType)e.Argument; if (ct == camType.PointGreyCam && Default.isEthernet) { if (mPTCam.mCameras[0] != null) { mPTCam.mCameras[0].Disconnect(); } if (mPTCam.CamConnection(mPTCam.CamSerialList)) { mPTCam.SetModeAndStartCapture(mPTCam.mCameras[0], Mode.Mode1); connectRoutine.ReportProgress(100); } } else { GV.mCamera = new CameraConnection(); if (GV.mCamera != null) //if there is a camera, dispose and reconnect. { GV.mCamera.disposeCam(); } if (!GV.mCamera.connect(ct)) { GV.IsCameraConnected = false; //mMessageBox.Show("No " + ct.ToString() + " found!"); } else { GV.IsCameraConnected = true; connectRoutine.ReportProgress(100); } } }
public void codeToParam(string source = null) { string[] c = (source == null)?code.Split(','):source.Split(','); if (c.Length < 16) { return; } setCamCenter = (c[0] == "1"); float.TryParse(c[1], out centerPoint.x); float.TryParse(c[2], out centerPoint.y); setCamPos = (c[3] == "1"); float.TryParse(c[4], out newCamPos.x); float.TryParse(c[5], out newCamPos.y); float.TryParse(c[6], out newCamPos.z); setCamRot = (c[7] == "1"); float.TryParse(c[8], out newCamRot.x); float.TryParse(c[9], out newCamRot.y); float.TryParse(c[10], out newCamRot.z); float.TryParse(c[11], out fov); float.TryParse(c[12], out motionTime); switch (c[13]) { case "1": newMotionType = camType.CAM_MOVE_POSITION; break; case "2": newMotionType = camType.CAM_MOVE_ROTATION; break; case "100": newMotionType = camType.CAM_MOVE_STOP; break; } switch (c[14]) { case "1": nowMotionType = camType.CAM_MOVE_POSITION; break; case "2": nowMotionType = camType.CAM_MOVE_ROTATION; break; case "100": nowMotionType = camType.CAM_MOVE_STOP; break; } if (string.IsNullOrEmpty(c[15]) == false && c.Length >= 17) { easingType = c[15] + "," + c[16]; } else { easingType = ""; } }