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
6 unit tests call DeltaEngine.Rendering3D.Cameras.LookAtCamera.Target
Assembly: DeltaEngine.Rendering3D (in DeltaEngine.Rendering3D.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: Vector3DRemarks
Examples
[Test, CloseAfterFirstFrame] public void PositionToTargetDistance() { var camera = CreateLookAtCamera(Vector3D.UnitZ * 5.0f, Vector3D.Zero); Assert.AreEqual(5.0f, camera.Position.Length - camera.Target.Length); }
[Test, CloseAfterFirstFrame] public void RotateCamera90DegreesAroundZAxis() { var camera = CreateLookAtCamera(Vector3D.UnitY, Vector3D.Zero); Assert.AreEqual(Vector3D.Zero, camera.YawPitchRoll); camera.YawPitchRoll = new Vector3D(90.0f, 0.0f, 0.0f); Assert.IsTrue(camera.Position.IsNearlyEqual(-Vector3D.UnitX)); Assert.AreEqual(Vector3D.Zero, camera.Target); }
[Test, CloseAfterFirstFrame] public void ZoomTowardTheTarget() { var camera = CreateLookAtCamera(Vector3D.UnitX * 2.0f, Vector3D.Zero); camera.Zoom(1.0f); Assert.AreEqual(Vector3D.UnitX, camera.Position); }
See Also