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
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
The Camera type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Camera | Initializes a new instance of the Camera 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 | Releases all resources used by the Camera (Overrides Entity Dispose .) | |
ForceProjectionMatrixUpdate | ||
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 | ||
GetCurrentViewMatrix | ||
GetOrDefault T | (Inherited from Entity.) | |
GetTags | (Inherited from Entity.) | |
Initialize | ||
OnViewportSizeChanged | ||
Remove T | (Inherited from Entity.) | |
RemoveTag | (Inherited from Entity.) | |
ResetDefaults | ||
ScreenPointToRay | ||
Set | (Inherited from Entity.) | |
SetComponents | (Inherited from Entity.) | |
Start T | (Inherited from Entity.) | |
Stop T | (Inherited from Entity.) | |
ToString | (Inherited from Entity.) | |
Use T | ||
WorldToScreenPoint |
Fields
Name | Description | |
---|---|---|
components | (Inherited from Entity.) | |
DefaultFarPlane | ||
DefaultFieldOfView | ||
DefaultNearPlane | ||
window |
Properties
Name | Description | |
---|---|---|
Current | ||
FarPlane | ||
FieldOfView | ||
IsActive | (Inherited from Entity.) | |
IsInitialized | ||
IsPauseable | (Inherited from Entity.) | |
NearPlane | ||
NumberOfComponents | (Inherited from Entity.) | |
Position | ||
UpdatePriority | (Inherited from Entity.) |
Remarks
Examples
[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