OrthoCamera 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.OrthoCameraTests
Examples

2 unit tests call DeltaEngine.Rendering3D.Cameras.OrthoCamera.Position
[Test, CloseAfterFirstFrame]
public void UpdateCameraPosition()
{
    Assert.IsTrue(Camera.IsInitialized);
    Assert.AreEqual(Vector3D.Zero, camera.Position);
    camera.Position += Vector3D.One * 2;
    Assert.AreEqual(new Vector3D(2, 2, 2), camera.Position);
}
[Test, CloseAfterFirstFrame]
public void TestViewPanning()
{
    camera.Position = Vector3D.UnitX;
    camera.Target = Vector3D.Zero;
    camera.ViewPanning(Vector2D.UnitX);
    Assert.IsTrue(new Vector3D(-1, 0, 0).IsNearlyEqual(camera.Target));
    Assert.IsTrue(new Vector3D(0, 0, 0).IsNearlyEqual(camera.Position));
}
See Also