LookAtCameraTests ZoomTowardTheTarget Method Delta Engine Documentation

Namespace: DeltaEngine.Rendering3D.Tests.Cameras
Assembly: DeltaEngine.Rendering3D.Tests (in DeltaEngine.Rendering3D.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void ZoomTowardTheTarget()
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 OverZoomTowardTheTarget()
{
    var camera = CreateLookAtCamera(Vector3D.UnitX * 3.0f, Vector3D.Zero);
    camera.Zoom(100.0f);
    Assert.IsTrue(camera.Position.IsNearlyEqual(Vector3D.Zero));
}
See Also