private void StopAnimation() { AnimationButton.Content = "Start camera rotation"; Camera1.StopRotation(); _isAnimationStarted = false; }
private void CameraRotationButton_OnClick(object sender, RoutedEventArgs e) { if (Camera1.IsRotating) { Camera1.StopRotation(); } else { Camera1.StartRotation(45, 0); } }
private void CameraRotationButton_OnClick(object sender, RoutedEventArgs e) { if (Camera1.IsRotating) { Camera1.StopRotation(); CameraRotationButton.Content = "Start camera rotation"; } else { Camera1.StartRotation(20, 0); CameraRotationButton.Content = "Stop camera rotation"; } }
private void ToggleCameraAnimation() { if (Camera1.IsRotating) { Camera1.StopRotation(); AnimateButton.Content = "Start animation"; } else { Camera1.StartRotation(10, 0); // animate with changing heading for 10 degrees in one second AnimateButton.Content = "Stop animation"; } }
private void OnAnimateCameraCheckBoxChanged(object sender, RoutedEventArgs e) { if (!this.IsLoaded) { return; } if (AnimateCameraCheckBox.IsChecked ?? false) { Camera1.StartRotation(30, 0); } else { Camera1.StopRotation(); } }
private void StopAnimation(bool isActionImmediate) { if (isActionImmediate) { Camera1.StopRotation(); // No easing } else { double accelerationSpeed = AccelerationSpeedSlider.Value; SphericalCamera.EasingFunctionDelegate easingFunction = GetEaseOutFunction(); // NOTE that ease in and ease out are different functions Camera1.StopRotation(accelerationSpeed, easingFunction); } StartStopSlowlyButton.Content = "START rotation slowly"; StartStopNowButton.Content = "START rotation now"; AccelerationSpeedTextBlock.Text = "accelerationSpeed (0 = disabled):"; _isRotationStarted = false; }
private void StopCameraRotation() { Camera1.StopRotation(); StartStopCameraRotateButton.Content = "Start camera rotate"; }
private void StopAnimation() { AnimationButton.Content = "Start camera animation"; Camera1.StopRotation(); }