Ejemplo n.º 1
0
        void ManipulationTranslate_ManipulationCompleted(SpatialGestureRecognizer sender, SpatialManipulationCompletedEventArgs args)
        {
            var data = args.TryGetCumulativeDelta(referenceFrame.CoordinateSystem);

            if (data != null)
            {
                var vector = new Vector3(data.Translation.X, data.Translation.Y, -data.Translation.Z);
                Application.InvokeOnMain(() => app.OnGestureManipulationCompleted(vector));
            }
        }
 private void OnGestureManipulationCompleted(SpatialGestureRecognizer sender, SpatialManipulationCompletedEventArgs args)
 {
     if (this.ManipulationCompletedEvent != null)
     {
         WaveForegroundTask.Run(() =>
         {
             this.ManipulationCompletedEvent(
                 this.service,
                 (SpatialSource)args.InteractionSourceKind,
                 args.TryGetCumulativeDelta(this.CoordinateSystem).Translation.ToWave(),
                 this.mixedRealityApplication.HeadRay);
         });
     }
 }