private void StopAnimation()
        {
            AnimationButton.Content = "START camera rotation";
            SceneCamera1.StopRotation();

            _isAnimationStarted = false;
        }
        private void StartAnimation()
        {
            AnimationButton.Content = "STOP camera rotation";

            // start rotating the camera with changing heading by 30 degrees per second.
            // Note that while the camera is rotating, it is still possible to rotate the camera with the mouse (during mouse rotation the animation is suspended).
            SceneCamera1.StartRotation(30, 0);

            _isAnimationStarted = true;
        }
Пример #3
0
        private void SceneCamera2_CameraChanged(object sender, Ab3d.Common.Cameras.CameraChangedRoutedEventArgs e)
        {
            // Enclose changes in BeginInit and EndInit to prevent multiple updates
            SceneCamera1.BeginInit();

            SceneCamera1.Heading  = SceneCamera2.Heading;
            SceneCamera1.Attitude = SceneCamera2.Attitude;
            SceneCamera1.Distance = SceneCamera2.Distance;

            SceneCamera1.EndInit();
        }
Пример #4
0
        private void ResetCamera_Click(object sender, RoutedEventArgs e)
        {
            // make all the changes at once
            SceneCamera1.BeginInit();

            SceneCamera1.Heading  = -30;
            SceneCamera1.Attitude = -15;
            SceneCamera1.Distance = 2;
            SceneCamera1.Offset   = new Vector3D(0, 0, 0);

            SceneCamera1.EndInit();
        }
Пример #5
0
        private void SceneCamera2_CameraChanged(object sender, Ab3d.Common.Cameras.CameraChangedRoutedEventArgs e)
        {
            // Manually sync the camera in Viewport3D in upper right corner with the main camera
            // Enclose changes in BeginInit and EndInit to prevent multiple updates
            SceneCamera1.BeginInit();

            SceneCamera1.Heading  = SceneCamera2.Heading;
            SceneCamera1.Attitude = SceneCamera2.Attitude;
            SceneCamera1.Distance = SceneCamera2.Distance;

            SceneCamera1.EndInit();
        }