Exemplo n.º 1
0
        /// <summary>
        /// Implements the MouseUp event handler for the manipulator
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected virtual void MouseUp(object sender, MouseButtonEventArgs e)
        {
            GizmoInAction = null;

            if (originBeforeMove != null && originAfterMove != null)
            {
                var inputNodesToManipulate = InputNodesToUpdateAfterMove(Vector.ByTwoPoints(originBeforeMove, originAfterMove));
                foreach (var(inputNode, amount) in inputNodesToManipulate)
                {
                    if (inputNode == null)
                    {
                        continue;
                    }

                    if (Math.Abs(amount) < MIN_OFFSET_VAL)
                    {
                        continue;
                    }

                    dynamic uiNode = inputNode;
                    uiNode.Value = Math.Round(amount, ROUND_UP_PARAM);
                }
            }

            //Update gizmo graphics after every camera view change
            var gizmos = GetGizmos(false);

            foreach (var gizmo in gizmos)
            {
                gizmo.UpdateGizmoGraphics();
            }
        }