コード例 #1
0
ファイル: ProjectionRoot.cs プロジェクト: DomCristaldi/CaveVR
 public void TurnOnRight()
 {
     transform.Find("Cameras/Main Camera-centerL").gameObject.SetActive(false);
     transform.Find("Cameras/Main Camera-centerR").gameObject.SetActive(false);
     transform.Find("Cameras/Main Camera-leftL").gameObject.SetActive(false);
     transform.Find("Cameras/Main Camera-leftR").gameObject.SetActive(false);
     transform.Find("Cameras/Main Camera-rightL").gameObject.SetActive(true);
     transform.Find("Cameras/Main Camera-rightR").gameObject.SetActive(true);
     whichCameraToViewFrom = viewType.right;
 }
コード例 #2
0
 public Document()
 {
     InitializeComponent();
     listView.Parent        = this;
     currentViewType        = viewType.noView;
     currentFilterType      = filterType.all;
     this.listView1.Visible = false;
     this.treeView1.Visible = false;
     listView.Show();
 }
コード例 #3
0
 public void OnGUI()
 {
     if (menuToggle)
     {
         ip = GUI.TextField(new Rect(20, 60, 150, 20), ip, 15);
         if (GUI.Button(new Rect(105, 10, 150, 20), "Start server as center"))
         {
             //Debug.Log("Not actually starting server yet");
             Debug.Log("SET CENTER TO TRUE");
             Settings.position = Settings.Position.Center;
             transform.Find("Main Camera-centerL").gameObject.SetActive(true);
             transform.Find("Main Camera-centerR").gameObject.SetActive(true);
             transform.Find("Main Camera-leftL").gameObject.SetActive(false);
             transform.Find("Main Camera-leftR").gameObject.SetActive(false);
             transform.Find("Main Camera-rightL").gameObject.SetActive(false);
             transform.Find("Main Camera-rightR").gameObject.SetActive(false);
             whichCameraToViewFrom = viewType.center;
             Settings.HideAndLockCursor();
             Network.InitializeServer(4, 12345, false);
         }
         if (GUI.Button(new Rect(180, 50, 150, 20), "Listen as left"))
         {
             //Debug.Log("Not left yet");
             Settings.position = Settings.Position.Left;
             transform.Find("Main Camera-centerL").gameObject.SetActive(false);
             transform.Find("Main Camera-centerR").gameObject.SetActive(false);
             transform.Find("Main Camera-leftL").gameObject.SetActive(true);
             transform.Find("Main Camera-leftR").gameObject.SetActive(true);
             transform.Find("Main Camera-rightL").gameObject.SetActive(false);
             transform.Find("Main Camera-rightR").gameObject.SetActive(false);
             whichCameraToViewFrom = viewType.left;
             Settings.HideAndLockCursor();
             Network.Connect(ip, port);
         }
         if (GUI.Button(new Rect(180, 75, 150, 20), "Listen as right"))
         {
             //Debug.Log("Not right yet");
             Settings.position = Settings.Position.Right;
             transform.Find("Main Camera-centerL").gameObject.SetActive(false);
             transform.Find("Main Camera-centerR").gameObject.SetActive(false);
             transform.Find("Main Camera-leftL").gameObject.SetActive(false);
             transform.Find("Main Camera-leftR").gameObject.SetActive(false);
             transform.Find("Main Camera-rightL").gameObject.SetActive(true);
             transform.Find("Main Camera-rightR").gameObject.SetActive(true);
             whichCameraToViewFrom = viewType.right;
             Settings.HideAndLockCursor();
             Network.Connect(ip, port);
         }
     }
 }
コード例 #4
0
        private void btnAddImage_Click(object sender, EventArgs e)
        {
            if (cmbAddImage.SelectedItem == null)
            {
                return;
            }

            TaskListCompleted(false);

            viewType viewType = ((KeyValuePair <string, viewType>)cmbAddImage.SelectedItem).Value;
            int      width    = (int)numWidthImages.Value;
            int      height   = (int)numHeightImages.Value;

            _client.ConvertToImages(new[] { viewType }, width, height, btnTopColor.BackColor, btnBottomColor.BackColor, chkCsi.Checked, chkOs.Checked);
            lstBoxTasks.Items.Add(String.Format("{0} ({1}x{2})", ((KeyValuePair <string, viewType>)cmbAddImage.SelectedItem).Key, width, height));
        }
コード例 #5
0
 //public void UpdateTrackerPosition(float x, float y, float z){
 //trackerPosition.localPosition = new Vector3(x, y, z);
 //}
 public void OnGUI()
 {
     if (menuToggle){
         ip = GUI.TextField(new Rect(20, 60, 150, 20), ip, 15);
         if (GUI.Button(new Rect(105,10,150,20), "Start server as center")){
             //Debug.Log("Not actually starting server yet");
             Debug.Log ("SET CENTER TO TRUE");
             Settings.position = Settings.Position.Center;
             transform.Find("Main Camera-centerL").gameObject.SetActive(true);
             transform.Find("Main Camera-centerR").gameObject.SetActive(true);
             transform.Find("Main Camera-leftL").gameObject.SetActive(false);
             transform.Find("Main Camera-leftR").gameObject.SetActive(false);
             transform.Find("Main Camera-rightL").gameObject.SetActive(false);
             transform.Find("Main Camera-rightR").gameObject.SetActive(false);
             whichCameraToViewFrom = viewType.center;
             Settings.HideAndLockCursor();
             Network.InitializeServer(4, 12345, false);
         }
         if (GUI.Button(new Rect(180, 50, 150, 20), "Listen as left")){
             //Debug.Log("Not left yet");
             Settings.position = Settings.Position.Left;
             transform.Find("Main Camera-centerL").gameObject.SetActive(false);
             transform.Find("Main Camera-centerR").gameObject.SetActive(false);
             transform.Find("Main Camera-leftL").gameObject.SetActive(true);
             transform.Find("Main Camera-leftR").gameObject.SetActive(true);
             transform.Find("Main Camera-rightL").gameObject.SetActive(false);
             transform.Find("Main Camera-rightR").gameObject.SetActive(false);
             whichCameraToViewFrom = viewType.left;
             Settings.HideAndLockCursor();
             Network.Connect(ip, port);
         }
         if (GUI.Button(new Rect(180,75,150,20), "Listen as right")){
             //Debug.Log("Not right yet");
             Settings.position = Settings.Position.Right;
             transform.Find("Main Camera-centerL").gameObject.SetActive(false);
             transform.Find("Main Camera-centerR").gameObject.SetActive(false);
             transform.Find("Main Camera-leftL").gameObject.SetActive(false);
             transform.Find("Main Camera-leftR").gameObject.SetActive(false);
             transform.Find("Main Camera-rightL").gameObject.SetActive(true);
             transform.Find("Main Camera-rightR").gameObject.SetActive(true);
             whichCameraToViewFrom = viewType.right;
             Settings.HideAndLockCursor();
             Network.Connect(ip, port);
         }
     }
 }
コード例 #6
0
 var(viewType, cooldown) = tuple;
コード例 #7
0
ファイル: ProjectionRoot.cs プロジェクト: DomCristaldi/CaveVR
 public void TurnOnRight()
 {
     transform.Find("Cameras/Main Camera-centerL").gameObject.SetActive(false);
     transform.Find("Cameras/Main Camera-centerR").gameObject.SetActive(false);
     transform.Find("Cameras/Main Camera-leftL").gameObject.SetActive(false);
     transform.Find("Cameras/Main Camera-leftR").gameObject.SetActive(false);
     transform.Find("Cameras/Main Camera-rightL").gameObject.SetActive(true);
     transform.Find("Cameras/Main Camera-rightR").gameObject.SetActive(true);
     whichCameraToViewFrom = viewType.right;
 }
コード例 #8
0
        /*
         * View Pannel - 视图功能模块
         */

        //改变视图
        private void changeView(viewType type)
        {
            model.SetView(type, false, model.AnimateCamera);
            model.Invalidate();
        }
コード例 #9
0
        public void SetCamera(viewType type, cameraProjectionType proj)
        {
            Camera.ProjectionMode = proj;
            m_viewtype = type;
            Viewport.SetCameraView(m_viewtype);

            if (Entities != null && Entities.Count > 0)
                ZoomFit();
            Refresh();
        }
コード例 #10
0
 public void SetCamera(viewType type)
 {
     SetCamera(type, Camera.ProjectionMode);
 }