OrthoCamera ClassDelta Engine Documentation
Orthogonal 3D camera. View code on GitHub
Inheritance Hierarchy

System Object
  DeltaEngine.Entities Entity
    DeltaEngine.Rendering3D.Cameras Camera
      DeltaEngine.Rendering3D.Cameras TargetedCamera
        DeltaEngine.Rendering3D.Cameras OrthoCamera

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

public class OrthoCamera : TargetedCamera

The OrthoCamera type exposes the following members.

Constructors

  NameDescription
Public methodOrthoCamera
Initializes a new instance of the OrthoCamera 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 (Overrides Camera GetCurrentProjectionMatrix .)
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 (Overrides Camera OnViewportSizeChanged(Size).)
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 methodViewPanning
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 propertyMaxZoom
Public propertyMinZoom
Public propertyNearPlane (Inherited from Camera.)
Public propertyNumberOfComponents (Inherited from Entity.)
Public propertyPosition (Overrides Camera Position.)
Public propertyTarget (Inherited from TargetedCamera.)
Public propertyUpdatePriority (Inherited from Entity.)
Public propertyZoomLevel
Public propertyZoomSmoothFactor
Top
Remarks

Tests: DeltaEngine.Rendering3D.Tests.Cameras.OrthoCameraTests
Examples

6 unit tests call DeltaEngine.Rendering3D.Cameras.OrthoCamera
[Test, CloseAfterFirstFrame]
public void UpdateCameraPosition()
{
    Assert.IsTrue(Camera.IsInitialized);
    Assert.AreEqual(Vector3D.Zero, camera.Position);
    camera.Position += Vector3D.One * 2;
    Assert.AreEqual(new Vector3D(2, 2, 2), camera.Position);
}
[Test, CloseAfterFirstFrame]
public void UpdateCameraZoom()
{
    camera.ZoomLevel = 2.0f;
    camera.MaxZoom = 10.0f;
    camera.MinZoom = 1.0f;
    Assert.AreEqual(2.0f, camera.ZoomLevel);
    camera.ZoomSmoothFactor = 1.0f;
    camera.Zoom(1.5f);
    Assert.AreEqual(3.5f, camera.ZoomLevel);
    camera.Zoom(10f);
    Assert.AreEqual(3.5f, camera.ZoomLevel);
}
[Test, CloseAfterFirstFrame]
public void UpdateCameraTarget()
{
    Assert.AreEqual(Vector3D.Zero, camera.Target);
    camera.Target += Vector3D.One * 2;
    Assert.AreEqual(new Vector3D(2, 2, 2), camera.Target);
}
See Also