Namespace: DeltaEngine.Rendering3D.Cameras
Assembly: DeltaEngine.Rendering3D (in DeltaEngine.Rendering3D.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Rendering3D.Tests.Cameras.LookAtCameraTests
3 unit tests call DeltaEngine.Rendering3D.Cameras.LookAtCamera.Zoom(System.Single)
Assembly: DeltaEngine.Rendering3D (in DeltaEngine.Rendering3D.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- amount
- Type: System Single
Remarks
Examples
[Test, CloseAfterFirstFrame] public void ZoomTowardTheTarget() { var camera = CreateLookAtCamera(Vector3D.UnitX * 2.0f, Vector3D.Zero); camera.Zoom(1.0f); Assert.AreEqual(Vector3D.UnitX, camera.Position); }
[Test, CloseAfterFirstFrame] public void ZoomOutwardTheTarget() { var camera = CreateLookAtCamera(Vector3D.UnitX, Vector3D.Zero); camera.Zoom(-1.0f); Assert.AreEqual(Vector3D.UnitX * 2.0f, camera.Position); }
[Test, CloseAfterFirstFrame] public void OverZoomTowardTheTarget() { var camera = CreateLookAtCamera(Vector3D.UnitX * 3.0f, Vector3D.Zero); camera.Zoom(100.0f); Assert.IsTrue(camera.Position.IsNearlyEqual(Vector3D.Zero)); }
See Also