Camera 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 virtual Vector3D Position { get; set; }

Property Value

Type: Vector3D
Remarks

Tests: DeltaEngine.Rendering3D.Tests.Cameras.FreeCameraTests
Remarks

Tests: DeltaEngine.Rendering3D.Tests.Cameras.PathCameraTests
Examples

7 unit tests call DeltaEngine.Rendering3D.Cameras.Camera.Position
[Test, CloseAfterFirstFrame]
public void Move()
{
    camera.Move(Vector3D.UnitX, 1.0f);
    Assert.AreEqual(new Vector3D(1.0f, 5.0f, 5.0f), camera.Position);
}
[Test, CloseAfterFirstFrame]
public void MoveUp()
{
    camera.MoveUp(10.0f);
    Assert.AreEqual(new Vector3D(0.0f, 15.0f, 5.0f), camera.Position);
}
[Test, CloseAfterFirstFrame]
public void MoveDown()
{
    camera.MoveDown(10.0f);
    Assert.AreEqual(new Vector3D(0.0f, -5.0f, 5.0f), camera.Position);
}
Examples

1 unit tests call DeltaEngine.Rendering3D.Cameras.Camera.Position
[Test, CloseAfterFirstFrame]
public void ThrowExceptionIfNoTrackPositionIsSpecified()
{
    Assert.Throws<PathCamera.NoTrackSpecified>(() => CreatePathCamera(null));
    Assert.Throws<PathCamera.NoTrackSpecified>(() => CreatePathCamera(new Matrix[0]));
    Assert.Throws<PathCamera.NoTrackSpecified>(() => CreatePathCamera(new[] { Matrix.Identity }));
}
See Also