PathCamera CurrentFrame 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 int CurrentFrame { get; set; }

Property Value

Type: Int32
Remarks

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

6 unit tests call DeltaEngine.Rendering3D.Cameras.PathCamera.CurrentFrame
[Test]
public void CameraCanBeMovedOnLinearTrackWithScrollWheel()
{
    new Grid3D(new Size(GridDimension));
    PathCamera camera = CreatePathCamera(GetLinearViewMatrixTrack(GridDimension));
    Command.Register(Command.Zoom, new MouseZoomTrigger());
    new Command(Command.Zoom, zoomAmount => camera.CurrentFrame += (int)(zoomAmount * 10));
}
[Test, CloseAfterFirstFrame]
public void CurrentFrameDoesNotChangeWhenNotMoving()
{
    PathCamera camera = CreatePathCamera(GetLinearViewMatrixTrack(GridDimension));
    AdvanceTimeAndUpdateEntities();
    Assert.AreEqual(0, camera.CurrentFrame);
}
[Test, CloseAfterFirstFrame]
public void CurrentFrameChangesWhenMoving()
{
    PathCamera camera = CreatePathCamera(GetLinearViewMatrixTrack(GridDimension));
    camera.IsMoving = true;
    AdvanceTimeAndUpdateEntities();
    Assert.IsTrue(camera.CurrentFrame > 0);
}
See Also