/// <summary> Creates a new instance of the Engine class with the given parameters. </summary> public Engine(ScreenParameters screenParameters, ViewportParameters viewportParameters, RenderParameters renderParameters) { _screenParameters = screenParameters; _viewportParameters = viewportParameters; _renderParameters = renderParameters; _cameraConverter = new CameraConverter(_screenParameters, _viewportParameters); }
internal CameraConverter(ScreenParameters screenParameters, ViewportParameters viewportParameters) { _viewportParameters = viewportParameters; _screenParameters = screenParameters; _halfScreenWidth = _screenParameters.Width / 2d; _halfScreenHeight = _screenParameters.Height / 2d; _viewportToScreenRatioX = _viewportParameters.Width / _screenParameters.Width; _viewportToScreenRatioY = _viewportParameters.Height / _screenParameters.Height; }