Handles cameras.
Definition cameracontext.h:19
virtual ~CameraContext()
destructor
Definition cameracontext.cc:27
static void UpdateCameras(const Graphics::FrameContext &ctx)
runs before frame is updated
Definition cameracontext.cc:48
static const Math::mat4 GetTransform(const Graphics::GraphicsEntityId id)
get transform
Definition cameracontext.cc:109
static void Create()
create context
Definition cameracontext.cc:36
static const Math::mat4 & GetView(const Graphics::GraphicsEntityId id)
get view
Definition cameracontext.cc:99
static const CameraSettings & GetSettings(const Graphics::GraphicsEntityId id)
get settings
Definition cameracontext.cc:139
CameraContext()
constructor
Definition cameracontext.cc:19
static void SetView(const Graphics::GraphicsEntityId id, const Math::mat4 &mat)
set view
Definition cameracontext.cc:89
static Graphics::GraphicsEntityId lodCamera
Definition cameracontext.h:78
static const Math::mat4 & GetViewProjection(const Graphics::GraphicsEntityId id)
get view-projection
Definition cameracontext.cc:129
static void SetupProjectionFov(const Graphics::GraphicsEntityId id, float aspect, float fov, float znear, float zfar)
setup as projection and fov
Definition cameracontext.cc:65
static void SetLODCamera(const Graphics::GraphicsEntityId id)
set the LOD camera
Definition cameracontext.cc:176
static Graphics::GraphicsEntityId GetLODCamera()
get the LOD camera
Definition cameracontext.cc:167
static void SetupOrthographic(const Graphics::GraphicsEntityId id, float width, float height, float znear, float zfar)
setup as ortographic
Definition cameracontext.cc:77
static const Math::mat4 & GetProjection(const Graphics::GraphicsEntityId id)
get projection
Definition cameracontext.cc:119
static void OnWindowResized(const CoreGraphics::WindowId windowId, SizeT width, SizeT height)
called if the window size has changed
Definition cameracontext.cc:149
Ids::IdAllocator< Graphics::CameraSettings, Math::mat4, Math::mat4, Math::mat4 > CameraAllocator
Definition cameracontext.h:75
static CameraAllocator cameraAllocator
Definition cameracontext.h:76
@ Camera_Projection
Definition cameracontext.h:66
@ Camera_Settings
Definition cameracontext.h:65
@ Camera_View
Definition cameracontext.h:67
@ Camera_ViewProjection
Definition cameracontext.h:68
static void Dealloc(const Graphics::ContextEntityId id)
deallocate a slice
Definition cameracontext.h:99
static Graphics::ContextEntityId Alloc()
allocate a new slice for this context
Definition cameracontext.h:90
Definition camerasettings.h:20
Definition graphicscontext.h:165
An ID allocator associates an id with a slice in an N number of arrays.
Definition idallocator.h:39
Ids::Id32 Alloc()
Allocate an object.
Definition idallocator.h:45
void Dealloc(Ids::Id32 index)
Deallocate an object. Just places it in freeids array for recycling.
Definition idallocator.h:65
Implements the shader server used by Vulkan.
Definition cameramanager.h:21
Nebula's scalar datatype.
Definition graphicscontext.h:133
Definition graphicsserver.h:31
The graphics entity is only an Id, to which we can attach GraphicsContexts.
Definition graphicsentity.h:16
A 4x4 single point precision float matrix.
Definition mat4.h:49
int SizeT
Definition types.h:49