internal bool OnBeforeInertia() { BeforeInertiaEventArgs args = new BeforeInertiaEventArgs(); BeforeInertia(this, args); return(args.CancelInertia); }
//Fingers removed, start inertia void OnBeforeInertia(object sender, BeforeInertiaEventArgs e) { //Tell the tracker manager that the user removed the fingers _pictureTrackerManager.InInertia(this); _processor.InertiaProcessor.InertiaTimerInterval = 15; _processor.InertiaProcessor.MaxInertiaSteps = 500; _processor.InertiaProcessor.InitialVelocity = _inertiaParam.InitialVelocity; _processor.InertiaProcessor.DesiredDisplacement = _inertiaParam.InitialVelocity.Magnitude * 250; _processor.InertiaProcessor.InitialAngularVelocity = _inertiaParam.InitialAngularVelocity * 20F / (float)Math.PI; _processor.InertiaProcessor.DesiredRotation = Math.Abs(_inertiaParam.InitialAngularVelocity * _processor.InertiaProcessor.InertiaTimerInterval * 540F / (float)Math.PI); _processor.InertiaProcessor.InitialExpansionVelocity = _inertiaParam.InitialExpansionVelocity * 15; _processor.InertiaProcessor.DesiredExpansion = Math.Abs(_inertiaParam.InitialExpansionVelocity * 4F); }
internal bool OnBeforeInertia() { BeforeInertiaEventArgs args = new BeforeInertiaEventArgs(); BeforeInertia(this, args); return args.CancelInertia; }