Esempio n. 1
0
        private void HideModifiers()
        {
            if (_arrowX1 != null)
            {
                _viewport.Children.Remove(_arrowX1.Model);
                _arrowX1 = null;
            }

            if (_arrowX2 != null)
            {
                _viewport.Children.Remove(_arrowX2.Model);
                _arrowX2 = null;
            }

            if (_arrowY1 != null)
            {
                _viewport.Children.Remove(_arrowY1.Model);
                _arrowY1 = null;
            }

            if (_arrowY2 != null)
            {
                _viewport.Children.Remove(_arrowY2.Model);
                _arrowY2 = null;
            }

            if (_arrowZ1 != null)
            {
                _viewport.Children.Remove(_arrowZ1.Model);
                _arrowZ1 = null;
            }

            if (_arrowZ2 != null)
            {
                _viewport.Children.Remove(_arrowZ2.Model);
                _arrowZ2 = null;
            }

            if (_ringX != null)
            {
                _viewport.Children.Remove(_ringX.Model);
                _ringX = null;
            }

            if (_ringY != null)
            {
                _viewport.Children.Remove(_ringY.Model);
                _ringY = null;
            }

            if (_ringZ != null)
            {
                _viewport.Children.Remove(_ringZ.Model);
                _ringZ = null;
            }

            if (_ballX1 != null)
            {
                _viewport.Children.Remove(_ballX1.Model);
                _ballX1 = null;
            }

            if (_ballX2 != null)
            {
                _viewport.Children.Remove(_ballX2.Model);
                _ballX2 = null;
            }

            if (_ballY1 != null)
            {
                _viewport.Children.Remove(_ballY1.Model);
                _ballY1 = null;
            }

            if (_ballY2 != null)
            {
                _viewport.Children.Remove(_ballY2.Model);
                _ballY2 = null;
            }

            if (_ballZ1 != null)
            {
                _viewport.Children.Remove(_ballZ1.Model);
                _ballZ1 = null;
            }

            if (_ballZ2 != null)
            {
                _viewport.Children.Remove(_ballZ2.Model);
                _ballZ2 = null;
            }
        }
Esempio n. 2
0
        private void GetNewArrows(out DraggableModifierArrow arrow1, out DraggableModifierArrow arrow2, DraggingModifier whichArrow)
        {
            switch (whichArrow)
            {
                case DraggingModifier.ArrowX1:
                case DraggingModifier.ArrowX2:
                    arrow1 = new DraggableModifierArrow(new Quaternion(new Vector3D(0, 1, 0), 90), _options.EditorColors);
                    arrow2 = new DraggableModifierArrow(new Quaternion(new Vector3D(0, 1, 0), -90), _options.EditorColors);
                    break;

                case DraggingModifier.ArrowY1:
                case DraggingModifier.ArrowY2:
                    arrow1 = new DraggableModifierArrow(new Quaternion(new Vector3D(1, 0, 0), -90), _options.EditorColors);
                    arrow2 = new DraggableModifierArrow(new Quaternion(new Vector3D(1, 0, 0), 90), _options.EditorColors);
                    break;

                case DraggingModifier.ArrowZ1:
                case DraggingModifier.ArrowZ2:
                    arrow1 = new DraggableModifierArrow(new Quaternion(new Vector3D(1, 0, 0), 0), _options.EditorColors);
                    arrow2 = new DraggableModifierArrow(new Quaternion(new Vector3D(1, 0, 0), 180), _options.EditorColors);
                    break;

                default:
                    throw new ApplicationException("Unexpected DraggingModifier: " + whichArrow.ToString());
            }

            _viewport.Children.Add(arrow1.Model);
            _viewport.Children.Add(arrow2.Model);
        }