Ejemplo n.º 1
0
        private void textBoxMatrixName_Validating(object sender, CancelEventArgs e)
        {
            if (listBoxMatrices.SelectedIndex < 0)
            {
                return;
            }

            TransformDefinition matrixDefinition = _savedMatrices[(string)listBoxMatrices.SelectedItem];

            _savedMatrices.Remove((string)listBoxMatrices.SelectedItem);
            _savedMatrices.Add(textBoxMatrixName.Text, matrixDefinition);
            listBoxMatrices.Items[listBoxMatrices.SelectedIndex] = textBoxMatrixName.Text;
        }
Ejemplo n.º 2
0
        public bool UpdatePanel(TransformDefinition NewDefinition, string PanelName = "")
        {
            if (String.IsNullOrEmpty(PanelName))
            {
                PanelName = ActivePanelName;
            }

            if (!_vrPanelSettings.ContainsKey(PanelName))
            {
                return(false);
            }

            _vrPanelSettings[PanelName] = NewDefinition;
            return(true);
        }
Ejemplo n.º 3
0
        public bool RenamePanel(string NewPanelName, string ExistingPanelName = "")
        {
            if (String.IsNullOrEmpty(ExistingPanelName))
            {
                ExistingPanelName = ActivePanelName;
            }

            if (!_vrPanelSettings.ContainsKey(ExistingPanelName))
            {
                return(false);
            }

            TransformDefinition m = _vrPanelSettings[ExistingPanelName];

            _vrPanelSettings.Remove(ExistingPanelName);
            _vrPanelSettings.Add(NewPanelName, m);
            return(true);
        }
Ejemplo n.º 4
0
        private void DisplayMatrix()
        {
            if (listBoxMatrices.SelectedIndex < 0)
            {
                return;
            }

            _displayingMatrixData = true;
            TransformDefinition matrix = _savedMatrices[(string)listBoxMatrices.SelectedItem];

            numericUpDownX.Value            = (decimal)matrix.PositionX;
            numericUpDownY.Value            = (decimal)matrix.PositionY;
            numericUpDownZ.Value            = (decimal)matrix.PositionZ;
            trackBarRotationX.Value         = (int)(matrix.RotationX);
            trackBarRotationY.Value         = (int)(matrix.RotationY);
            trackBarRotationZ.Value         = (int)(matrix.RotationZ);
            numericUpDownOverlayWidth.Value = (decimal)matrix.Width;
            _displayingMatrixData           = false;
            if (_vrLocatorOverlay != null)
            {
                _vrLocatorOverlay.Transform = _savedMatrices[(string)listBoxMatrices.SelectedItem].ToHmdMatrix34_t();
            }
        }
Ejemplo n.º 5
0
        public static VRPanelSetting DefaultVRMatrix()
        {
            TransformDefinition defaultMatrix = new TransformDefinition();

            return(new VRPanelSetting("Default", defaultMatrix));
        }
Ejemplo n.º 6
0
 public VRPanelSetting(string Name, TransformDefinition Matrix)
 {
     HMDPanelMatrix = Matrix;
     PanelName      = Name;
 }