CCT.NUI.Samples.ImageManipulation.HandTracker.HandleTranslation C# (CSharp) Method

HandleTranslation() public method

public HandleTranslation ( InteractiveImage image, float zoomFactory ) : void
image InteractiveImage
zoomFactory float
return void
        public void HandleTranslation(InteractiveImage image, float zoomFactory)
        {
            this.hoveredImage = image;
            hoveredImage.Hovered = true;

            if (isResizing)
            {
                return;
            }
            var handClosed = handData.FingerCount <= 1;
            if (isDragging)
            {
                hoveredImage.Translate((handData.PalmPoint.Value.X - startDragPoint.X) * zoomFactory, (handData.PalmPoint.Value.Y - startDragPoint.Y) * zoomFactory);
            }
            if (handClosed)
            {
                startDragPoint = new Point(handData.PalmPoint.Value.X, handData.PalmPoint.Value.Y, 0);
            }
            isDragging = handClosed;
        }