Camera ClassDelta Engine Documentation
Provides some useful constants and properties that are commonly used in most camera classes. The current camera can be assigned using Camera.Use. View code on GitHub
Inheritance Hierarchy

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

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

public abstract class Camera : Entity

The Camera type exposes the following members.

Constructors

  NameDescription
Protected methodCamera
Initializes a new instance of the Camera 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
Releases all resources used by the Camera
(Overrides Entity Dispose .)
Protected methodForceProjectionMatrixUpdate
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
Protected methodGetCurrentViewMatrix
Public methodGetOrDefault T  (Inherited from Entity.)
Public methodGetTags (Inherited from Entity.)
Public methodInitialize
Protected methodOnViewportSizeChanged
Public methodRemove T  (Inherited from Entity.)
Public methodRemoveTag (Inherited from Entity.)
Public methodResetDefaults
Public methodScreenPointToRay
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 methodStatic memberUse T 
Public methodWorldToScreenPoint
Top
Fields

  NameDescription
Protected fieldcomponents (Inherited from Entity.)
Protected fieldStatic memberDefaultFarPlane
Protected fieldStatic memberDefaultFieldOfView
Protected fieldStatic memberDefaultNearPlane
Protected fieldwindow
Top
Properties

  NameDescription
Public propertyStatic memberCurrent
Public propertyFarPlane
Public propertyFieldOfView
Public propertyIsActive (Inherited from Entity.)
Public propertyStatic memberIsInitialized
Public propertyIsPauseable (Inherited from Entity.)
Public propertyNearPlane
Public propertyNumberOfComponents (Inherited from Entity.)
Public propertyPosition
Public propertyUpdatePriority (Inherited from Entity.)
Top
Remarks

Tests: DeltaEngine.Rendering3D.Tests.Cameras.CameraTests
Examples

2 unit tests call DeltaEngine.Rendering3D.Cameras.Camera
[Test, CloseAfterFirstFrame]
public void AfterSetupACameraTheAmbientContextShouldBeInitialized()
{
    Assert.IsTrue(Camera.IsInitialized);
}
[Test, ApproveFirstFrameScreenshot]
public void CameraShouldBeAbleToHandleViewportChanges()
{
    new Grid3D(new Size(5));
    usedDevice = Resolve<Device>();
    usedWindow = Resolve<Window>();
    Matrix originalProjectionMatrix = usedDevice.CameraProjectionMatrix;
    usedWindow.ViewportPixelSize = new Size(400, 300);
    usedDevice.Set3DMode();
    Assert.AreNotEqual(originalProjectionMatrix, usedDevice.CameraProjectionMatrix);
}
See Also