public override void UpdateTransforms()
        {
            QuadShape2D        quad   = _data.Quad;
            GizmoPlaneSlider2D slider = _data.Slider;

            quad.Center          = slider.Position;
            quad.RotationDegrees = slider.RotationDegrees;
            quad.Size            = slider.GetRealQuadSize();
            _data.QuadBorder.OnQuadShapeChanged();
        }
        public override void UpdateTransforms()
        {
            QuadShape2D       quad            = _data.Quad;
            GizmoLineSlider2D slider          = _data.Slider;
            float             sliderLength    = slider.GetRealLength();
            Vector2           sliderDirection = slider.GetRealDirection();

            quad.Width  = sliderLength;
            quad.Height = slider.GetRealBoxThickness();
            quad.AlignWidth(sliderDirection);
            quad.Center = slider.StartPosition + sliderDirection * 0.5f * sliderLength;
        }
Exemplo n.º 3
0
        public GizmoQuad2DBorder(GizmoPlaneSlider2D planeSlider, GizmoHandle targetHandle, QuadShape2D targetQuad)
        {
            _planeSlider = planeSlider;

            _targetHandle = targetHandle;
            _targetQuad   = targetQuad;

            _borderQuadIndex          = _targetHandle.Add2DShape(_borderQuad);
            _borderQuad.PtContainMode = Shape2DPtContainMode.OnBorder;

            _controllerData.Border          = this;
            _controllerData.PlaneSlider     = _planeSlider;
            _controllerData.BorderQuad      = _borderQuad;
            _controllerData.BorderQuadIndex = _borderQuadIndex;
            _controllerData.Gizmo           = targetHandle.Gizmo;
            _controllerData.TargetHandle    = targetHandle;
            _controllerData.TargetQuad      = _targetQuad;

            _controllers[(int)GizmoQuad2DBorderType.Thin] = new GizmoThinQuad2DBorderController(_controllerData);

            _targetHandle.Gizmo.PreUpdateBegin += OnGizmoPreUpdateBegin;
        }
        public override void UpdateEpsilons()
        {
            QuadShape2D quad = _data.Quad;

            quad.SizeEps = Vector2Ex.FromValue(_data.Slider.Settings.AreaHoverEps);
        }