CCT.NUI.WPFSamples.VideoManipulationWindow.ExecuteOnHitResult C# (CSharp) Method

ExecuteOnHitResult() private method

private ExecuteOnHitResult ( CCT fingerTip, Action action ) : void
fingerTip CCT
action Action
return void
        private void ExecuteOnHitResult(CCT.NUI.Core.Point fingerTip, Action<RayMeshGeometry3DHitTestResult> action)
        {
            this.Dispatcher.Invoke(new Action(() =>
            {
                var hitTestResult = VisualTreeHelper.HitTest(this.viewPort, this.canvas.TranslatePoint(new System.Windows.Point(fingerTip.X, fingerTip.Y), this.canvas));
                if (hitTestResult is RayMeshGeometry3DHitTestResult)
                {
                    action(hitTestResult as RayMeshGeometry3DHitTestResult);
                }
            }));
        }