LookAtCamera ClassDelta Engine Documentation
Basic camera for 3D which can zoom, move and rotate around the Target. View code on GitHub
Inheritance Hierarchy

System Object
  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

public class LookAtCamera : TargetedCamera

The LookAtCamera type exposes the following members.

Constructors

  NameDescription
Public methodLookAtCamera
Initializes a new instance of the LookAtCamera 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 (Inherited from TargetedCamera.)
Protected methodGetFinalTargetPosition (Inherited from TargetedCamera.)
Public methodGetOrDefault T  (Inherited from Entity.)
Public methodGetTags (Inherited from Entity.)
Public methodInitialize (Inherited from Camera.)
Protected methodOnViewportSizeChanged (Inherited from Camera.)
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.)
Public methodZoom
Top
Fields

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

  NameDescription
Public propertyFarPlane (Inherited from Camera.)
Public propertyFieldOfView (Inherited from Camera.)
Public propertyIsActive (Inherited from Entity.)
Public propertyIsPauseable (Inherited from Entity.)
Public propertyNearPlane (Inherited from Camera.)
Public propertyNormalizedLookVector
Public propertyNumberOfComponents (Inherited from Entity.)
Public propertyPosition (Overrides Camera Position.)
Public propertyTarget (Overrides TargetedCamera Target.)
Public propertyUpdatePriority (Inherited from Entity.)
Public propertyYawPitchRoll
Top
Remarks

Tests: DeltaEngine.Rendering3D.Tests.Cameras.LookAtCameraTests
Examples

10 unit tests call DeltaEngine.Rendering3D.Cameras.LookAtCamera
[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