//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); }
void ManipulationProcessorBeforeInertia(object sender, BeforeInertiaEventArgs e) { //change the inertia steps and/or use a timespan with the inertiaprocessor for different behaviors/sensitivity _manipulationProcessor.InertiaProcessor.MaxInertiaSteps = 500; //panning _manipulationProcessor.InertiaProcessor.DesiredDeceleration = 0.002f; _manipulationProcessor.InertiaProcessor.InitialVelocity = _manipulationProcessor.Velocity; //Expansion (zoom) _manipulationProcessor.InertiaProcessor.InitialExpansionVelocity = _manipulationProcessor.ExpansionVelocity; _manipulationProcessor.InertiaProcessor.DesiredExpansionDeceleration = 0.0005f; //rotation _manipulationProcessor.InertiaProcessor.InitialAngularVelocity = _manipulationProcessor.AngularVelocity; _manipulationProcessor.InertiaProcessor.DesiredAngularDeceleration = 0.0002f; }