Namespace: DeltaEngine.Rendering3D.Cameras
Assembly: DeltaEngine.Rendering3D (in DeltaEngine.Rendering3D.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Rendering3D.Tests.Cameras.OrthoCameraTests
3 unit tests call DeltaEngine.Rendering3D.Cameras.OrthoCamera.ZoomLevel
Assembly: DeltaEngine.Rendering3D (in DeltaEngine.Rendering3D.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: SingleRemarks
Examples
[Test, CloseAfterFirstFrame] public void UpdateCameraZoom() { camera.ZoomLevel = 2.0f; camera.MaxZoom = 10.0f; camera.MinZoom = 1.0f; Assert.AreEqual(2.0f, camera.ZoomLevel); camera.ZoomSmoothFactor = 1.0f; camera.Zoom(1.5f); Assert.AreEqual(3.5f, camera.ZoomLevel); camera.Zoom(10f); Assert.AreEqual(3.5f, camera.ZoomLevel); }
[Test, CloseAfterFirstFrame] public void UpdateViewportSize() { var window = Resolve<Window>(); var previousSize = window.ViewportPixelSize; window.ViewportPixelSize = previousSize / 2; Assert.AreEqual(1.0f, camera.ZoomLevel); }
[Test, CloseAfterFirstFrame] public void UpdateProjectionMatrix() { var device = Resolve<Device>(); device.Set3DMode(); Assert.AreEqual(1.0f, camera.ZoomLevel); }
See Also