public void Show() { if (_locatorOverlay == null) { _locatorOverlay = new VRLocatorOverlay(); InitMatrixEditor(); } _locatorOverlay.Show(); }
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(); } }
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(); }
//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(); } }
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; } }
public void SetOverlay(VRLocatorOverlay vRLocatorOverlay) { _vrLocatorOverlay = vRLocatorOverlay; ApplyOverlayWidth(); ApplyMatrixToOverlay(true); }