Follows a path as if on rails. Can be started and stopped. Updates at 60fps
View code on GitHub
Inheritance Hierarchy
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
The PathCamera type exposes the following members.
Constructors
Name | Description | |
---|---|---|
PathCamera(Device, Window) | Initializes a new instance of the PathCamera class | |
PathCamera(Device, Window, CameraPath) | Initializes a new instance of the PathCamera class |
Methods
Name | Description | |
---|---|---|
Add T | (Inherited from Entity.) | |
AddTag | (Inherited from Entity.) | |
ClearTags | (Inherited from Entity.) | |
Contains T | (Inherited from Entity.) | |
ContainsBehavior T | (Inherited from Entity.) | |
ContainsTag | (Inherited from Entity.) | |
Deactivate | (Inherited from Entity.) | |
Dispose | (Inherited from Camera.) | |
ForceProjectionMatrixUpdate | (Inherited from Camera.) | |
Get T |
Gets a specific component, derived classes can return faster cached values (e.g. Entity2D)
View code on GitHub (Inherited from Entity.) | |
GetActiveBehaviors | (Inherited from Entity.) | |
GetComponentsForSaving | (Inherited from Entity.) | |
GetCurrentProjectionMatrix | (Inherited from Camera.) | |
GetCurrentViewMatrix | (Overrides Camera GetCurrentViewMatrix .) | |
GetOrDefault T | (Inherited from Entity.) | |
GetTags | (Inherited from Entity.) | |
Initialize | (Inherited from Camera.) | |
OnViewportSizeChanged | (Inherited from Camera.) | |
RapidUpdate | ||
Remove T | (Inherited from Entity.) | |
RemoveTag | (Inherited from Entity.) | |
ResetDefaults | (Overrides Camera ResetDefaults .) | |
ScreenPointToRay | (Inherited from Camera.) | |
Set | (Inherited from Entity.) | |
SetComponents | (Inherited from Entity.) | |
Start T | (Inherited from Entity.) | |
Stop T | (Inherited from Entity.) | |
ToString | (Inherited from Entity.) | |
WorldToScreenPoint | (Inherited from Camera.) |
Fields
Name | Description | |
---|---|---|
components | (Inherited from Entity.) | |
window | (Inherited from Camera.) |
Properties
Name | Description | |
---|---|---|
CurrentFrame | ||
FarPlane | (Inherited from Camera.) | |
FieldOfView | (Inherited from Camera.) | |
IsActive | (Inherited from Entity.) | |
IsMoving | ||
IsPauseable | (Inherited from Entity.) | |
NearPlane | (Inherited from Camera.) | |
NumberOfComponents | (Inherited from Entity.) | |
Position | (Inherited from Camera.) | |
UpdatePriority | (Inherited from Entity.) |
Remarks
Examples
[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