public void StopCameraRotation()
 {
     BackgroundRendererDispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
     {
         _backgroundHeadingChangeInSecond = 0;
         _lastCameraChangeTime            = DateTime.Now;
     }));
 }
        public virtual void RenderScene()
        {
            // Create only one delegate for Invoke call
            if (_renderSceneInternalDelegate == null)
            {
                _renderSceneInternalDelegate = new Action(() =>
                {
                    RenderSceneInternal();
                });
            }

            BackgroundRendererDispatcher.Invoke(DispatcherPriority.Normal, _renderSceneInternalDelegate);
        }
 public void Dispose()
 {
     if (BackgroundRendererDispatcher == Dispatcher.CurrentDispatcher)
     {
         Dispose(true);
     }
     else
     {
         BackgroundRendererDispatcher.BeginInvoke(new Action(() =>
         {
             _abortBackgroundRendering = true;
             Dispose(true);
         }));
     }
 }
        public void ChangeCamera(double heading, double attitude, double distance, Point3D targetPosition)
        {
            if (_targetPositionCamera == null)
            {
                return;
            }

            BackgroundRendererDispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
            {
                _targetPositionCamera.BeginInit();
                _targetPositionCamera.TargetPosition = targetPosition;
                _targetPositionCamera.Heading        = heading;
                _targetPositionCamera.Attitude       = attitude;
                _targetPositionCamera.Distance       = distance;
                _targetPositionCamera.EndInit();

                isSceneDirty = true;
            }));
        }