LookAtCamera Position Property Delta Engine Documentation

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

public override Vector3D Position { get; set; }

Property Value

Type: Vector3D
Remarks

Tests: DeltaEngine.Rendering3D.Tests.Cameras.LookAtCameraTests
Examples

4 unit tests call DeltaEngine.Rendering3D.Cameras.LookAtCamera.Position
[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 LookAtEntity3D()
{
    var entity = new Entity3D(Vector3D.One * 5.0f, Quaternion.Identity);
    var camera = CreateLookAtCamera(Vector3D.Zero, entity);
    Assert.AreEqual(camera.Target, entity.Position);
}
[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