PathCamera ClassDelta Engine Documentation
Follows a path as if on rails. Can be started and stopped. Updates at 60fps View code on GitHub
Inheritance Hierarchy

System Object
  DeltaEngine.Entities Entity
    DeltaEngine.Rendering3D.Cameras Camera
      DeltaEngine.Rendering3D.Cameras PathCamera

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

public sealed class PathCamera : Camera, 
	RapidUpdateable

The PathCamera type exposes the following members.

Constructors

  NameDescription
Public methodPathCamera(Device, Window)
Initializes a new instance of the PathCamera class
Public methodPathCamera(Device, Window, CameraPath)
Initializes a new instance of the PathCamera class
Top
Methods

  NameDescription
Public methodAdd T  (Inherited from Entity.)
Public methodAddTag (Inherited from Entity.)
Public methodClearTags (Inherited from Entity.)
Public methodContains T  (Inherited from Entity.)
Public methodContainsBehavior T  (Inherited from Entity.)
Public methodContainsTag (Inherited from Entity.)
Protected methodDeactivate (Inherited from Entity.)
Public methodDispose (Inherited from Camera.)
Protected methodForceProjectionMatrixUpdate (Inherited from Camera.)
Public methodGet T 
Gets a specific component, derived classes can return faster cached values (e.g. Entity2D) View code on GitHub
(Inherited from Entity.)
Protected methodGetActiveBehaviors (Inherited from Entity.)
Protected methodGetComponentsForSaving (Inherited from Entity.)
Protected methodGetCurrentProjectionMatrix (Inherited from Camera.)
Protected methodGetCurrentViewMatrix (Overrides Camera GetCurrentViewMatrix .)
Public methodGetOrDefault T  (Inherited from Entity.)
Public methodGetTags (Inherited from Entity.)
Public methodInitialize (Inherited from Camera.)
Protected methodOnViewportSizeChanged (Inherited from Camera.)
Public methodRapidUpdate
Public methodRemove T  (Inherited from Entity.)
Public methodRemoveTag (Inherited from Entity.)
Public methodResetDefaults (Overrides Camera ResetDefaults .)
Public methodScreenPointToRay (Inherited from Camera.)
Public methodSet (Inherited from Entity.)
Public methodSetComponents (Inherited from Entity.)
Public methodStart T  (Inherited from Entity.)
Public methodStop T  (Inherited from Entity.)
Public methodToString (Inherited from Entity.)
Public methodWorldToScreenPoint (Inherited from Camera.)
Top
Fields

  NameDescription
Protected fieldcomponents (Inherited from Entity.)
Protected fieldwindow (Inherited from Camera.)
Top
Properties

  NameDescription
Public propertyCurrentFrame
Public propertyFarPlane (Inherited from Camera.)
Public propertyFieldOfView (Inherited from Camera.)
Public propertyIsActive (Inherited from Entity.)
Public propertyIsMoving
Public propertyIsPauseable (Inherited from Entity.)
Public propertyNearPlane (Inherited from Camera.)
Public propertyNumberOfComponents (Inherited from Entity.)
Public propertyPosition (Inherited from Camera.)
Public propertyUpdatePriority (Inherited from Entity.)
Top
Remarks

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

10 unit tests call DeltaEngine.Rendering3D.Cameras.PathCamera
[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 }));
}
[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]
public void AutomatedCameraMoveOnLinearTrackOnMiddleClick()
{
    var linearTrack = GetLinearViewMatrixTrack(GridDimension);
    MoveCameraAutomatedOnTrack(linearTrack);
}
See Also