コード例 #1
0
 public void Show()
 {
     if (_locatorOverlay == null)
     {
         _locatorOverlay = new VRLocatorOverlay();
         InitMatrixEditor();
     }
     _locatorOverlay.Show();
 }
コード例 #2
0
        public VRLocator()//int panelWidth = 800, int panelHeight = 320)
        {
            //_panelTexture.eType = ETextureType.DirectX;
            VRInitializedOk = InitVR();
            //_locatorPictureBox.Width = panelWidth;
            //_locatorPictureBox.Height = panelHeight;

            if (VRInitializedOk)
            {
                _locatorOverlay = new VRLocatorOverlay();
                InitMatrixEditor();
            }
        }
コード例 #3
0
        public void ApplyPanelSettings(VRLocatorOverlay VROverlay, string PanelName = "")
        {
            // Apply the transform to the given Overlay (we set the matrix and panel size)
            if (String.IsNullOrEmpty(PanelName))
            {
                PanelName = ActivePanelName;
            }
            if (!_vrPanelSettings.ContainsKey(PanelName))
            {
                return;
            }

            VROverlay.WidthInMeters = _vrPanelSettings[PanelName].Width;
            VROverlay.Transform     = _vrPanelSettings[PanelName].ToHmdMatrix34_t();
        }
コード例 #4
0
        //private FormLocator _locatorForm = null;

        public FormVRMatrixEditor(VRLocatorOverlay vrLocatorOverlay)
        {
            InitializeComponent();
            // Attach our form configuration saver
            _formConfig = new ConfigSaverClass(this, true);
            _formConfig.RestorePreviousSize = false;
            _formConfig.ExcludedControls.Add(textBoxMatrixName);
            _formConfig.SaveEnabled = true;
            _formConfig.RestoreFormValues();

            _vrLocatorOverlay = vrLocatorOverlay;
            InitMatrices();
            //_hmdMatrix = new HmdMatrix34_t();
            buttonApply.Enabled = !checkBoxAutoApply.Checked;
            ApplyOverlayWidth();
            if (listBoxMatrices.SelectedIndex > -1)
            {
                _vrLocatorOverlay.Transform = _savedMatrices[(string)listBoxMatrices.SelectedItem].ToHmdMatrix34_t();
            }
        }
コード例 #5
0
        public void Hide(bool CloseMatrixWindow = true)
        {
            if (_locatorOverlay != null)
            {
                try
                {
                    _locatorOverlay.Hide();
                    _locatorOverlay.Destroy();
                    _locatorOverlay = null;
                }
                catch { }
            }

            if (CloseMatrixWindow)
            {
                if (_formVRMatrixEditor != null && !_formVRMatrixEditor.IsDisposed && _formVRMatrixEditor.Visible)
                {
                    _formVRMatrixEditor.Close();
                }
                _formVRMatrixEditor = null;
            }
        }
コード例 #6
0
 public void SetOverlay(VRLocatorOverlay vRLocatorOverlay)
 {
     _vrLocatorOverlay = vRLocatorOverlay;
     ApplyOverlayWidth();
     ApplyMatrixToOverlay(true);
 }