private void ChangeCameraButton_OnClick(object sender, RoutedEventArgs e)
        {
            _cameraIndex++;

            switch (_cameraIndex)
            {
            case 1:
                Camera1.BeginInit();
                Camera1.Heading        = 47;
                Camera1.Attitude       = -8.6;
                Camera1.Distance       = 1200;
                Camera1.TargetPosition = new Point3D(0, 60, 0);
                Camera1.Offset         = new Vector3D(-46, -227, 66);
                Camera1.EndInit();
                break;

            case 2:
                Camera1.BeginInit();
                Camera1.Heading        = -1.4;
                Camera1.Attitude       = -4;
                Camera1.Distance       = 1776;
                Camera1.TargetPosition = new Point3D(0, 60, 0);
                Camera1.Offset         = new Vector3D(-16, -109, 37);
                Camera1.EndInit();
                break;

            case 3:
                Camera1.BeginInit();
                Camera1.Heading        = 0;
                Camera1.Attitude       = -31;
                Camera1.Distance       = 1325;
                Camera1.TargetPosition = new Point3D(0, 60, 0);
                Camera1.Offset         = new Vector3D(10, -134, -130);
                Camera1.EndInit();
                break;

            case 4:
                Camera1.BeginInit();
                Camera1.Heading        = -0.57;
                Camera1.Attitude       = -89;
                Camera1.Distance       = 4275;
                Camera1.TargetPosition = new Point3D(0, 60, 0);
                Camera1.Offset         = new Vector3D(-16, -109, 37);
                Camera1.EndInit();
                break;

            default:
                Camera1.BeginInit();
                Camera1.Heading        = 30;
                Camera1.Attitude       = -20;
                Camera1.Distance       = 2500;
                Camera1.TargetPosition = new Point3D(0, 60, 0);
                Camera1.Offset         = new Vector3D(0, 0, 0);
                Camera1.EndInit();

                _cameraIndex = 0;
                break;
            }
        }
Example #2
0
        private void ResetCameraButton_OnClick(object sender, RoutedEventArgs e)
        {
            Camera1.BeginInit();

            Camera1.Heading        = 30;
            Camera1.Attitude       = -20;
            Camera1.Bank           = 0;
            Camera1.Distance       = 200;
            Camera1.TargetPosition = new Point3D(0, 0, 0);
            Camera1.Offset         = new Vector3D(0, 0, 0);

            Camera1.EndInit();
        }
Example #3
0
        private void ResetCamera()
        {
            Camera1.BeginInit();

            Camera1.Heading  = 30;
            Camera1.Attitude = -30;
            Camera1.Distance = 300;

            Camera1.Offset         = new Vector3D(0, 0, 0);
            Camera1.TargetPosition = new Point3D(0, 0, 0);
            Camera1.EndInit();

            Camera1.Refresh();
        }
Example #4
0
        private void Camera2_OnCameraChanged(object sender, CameraChangedRoutedEventArgs e)
        {
            if (_isInternalChange) // Prevent infinite call or Camera1 / 2 change handlers
            {
                return;
            }

            _isInternalChange = true;

            Camera1.BeginInit();
            Camera1.Heading  = Camera2.Heading;
            Camera1.Attitude = Camera2.Attitude;
            Camera1.Distance = Camera2.Distance;
            Camera1.Offset   = Camera2.Offset;
            Camera1.EndInit();

            _isInternalChange = false;
        }