IsometricCamera Target 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 Target { get; set; }

Property Value

Type: Vector3D
Remarks

Tests: DeltaEngine.Rendering3D.Tests.Cameras.IsometricCameraTests
Examples

3 unit tests call DeltaEngine.Rendering3D.Cameras.IsometricCamera.Target
[Test, CloseAfterFirstFrame]
public void SettingPositionMovesTarget()
{
    camera.Position = new Vector3D(10.0f, 10.0f, 10.0f);
    Assert.AreEqual(new Vector3D(10.0f, 11.0f, 10.0f), camera.Target);
}
[Test, CloseAfterFirstFrame]
public void SettingTargetMovesPosition()
{
    camera.Target = new Vector3D(10.0f, 10.0f, 10.0f);
    Assert.AreEqual(new Vector3D(10.0f, 9.0f, 10.0f), camera.Position);
}
[Test, CloseAfterFirstFrame]
public void CreateWithLookDirection()
{
    var lookDirection = Vector3D.UnitY;
    camera = new IsometricCamera(Resolve<Device>(), Resolve<Window>(), lookDirection);
    Assert.AreEqual(-lookDirection, camera.Position);
    Assert.AreEqual(Vector3D.Zero, camera.Target);
}
See Also