Basic camera for 3D which can zoom, move and rotate around the Target.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Entities Entity
DeltaEngine.Rendering3D.Cameras Camera
DeltaEngine.Rendering3D.Cameras TargetedCamera
DeltaEngine.Rendering3D.Cameras LookAtCamera
Namespace: DeltaEngine.Rendering3D.Cameras
Assembly: DeltaEngine.Rendering3D (in DeltaEngine.Rendering3D.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The LookAtCamera type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | LookAtCamera | Initializes a new instance of the LookAtCamera 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 | (Inherited from TargetedCamera.) |
![]() | GetFinalTargetPosition | (Inherited from TargetedCamera.) |
![]() | GetOrDefault T | (Inherited from Entity.) |
![]() | GetTags | (Inherited from Entity.) |
![]() | Initialize | (Inherited from Camera.) |
![]() | OnViewportSizeChanged | (Inherited from Camera.) |
![]() | 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.) |
![]() | Zoom |
Fields
Name | Description | |
---|---|---|
![]() | components | (Inherited from Entity.) |
![]() | window | (Inherited from Camera.) |
Properties
Name | Description | |
---|---|---|
![]() | FarPlane | (Inherited from Camera.) |
![]() | FieldOfView | (Inherited from Camera.) |
![]() | IsActive | (Inherited from Entity.) |
![]() | IsPauseable | (Inherited from Entity.) |
![]() | NearPlane | (Inherited from Camera.) |
![]() | NormalizedLookVector | |
![]() | NumberOfComponents | (Inherited from Entity.) |
![]() | Position | (Overrides Camera Position.) |
![]() | Target | (Overrides TargetedCamera Target.) |
![]() | UpdatePriority | (Inherited from Entity.) |
![]() | YawPitchRoll |
Remarks
Examples
[Test, ApproveFirstFrameScreenshot] public void RenderGrid() { CreateLookAtCamera(new Vector3D(0.0f, -5.0f, 5.0f), Vector3D.Zero); new Grid3D(new Size(9)); }
[Test, CloseAfterFirstFrame] public void PositionToTargetDistance() { var camera = CreateLookAtCamera(Vector3D.UnitZ * 5.0f, Vector3D.Zero); Assert.AreEqual(5.0f, camera.Position.Length - camera.Target.Length); }
[Test, CloseAfterFirstFrame] public void RotateCamera90DegreesAroundZAxis() { var camera = CreateLookAtCamera(Vector3D.UnitY, Vector3D.Zero); Assert.AreEqual(Vector3D.Zero, camera.YawPitchRoll); camera.YawPitchRoll = new Vector3D(90.0f, 0.0f, 0.0f); Assert.IsTrue(camera.Position.IsNearlyEqual(-Vector3D.UnitX)); Assert.AreEqual(Vector3D.Zero, camera.Target); }
See Also