Nebula
|
#include <cameracontext.h>
Handles cameras.
Inherits Graphics::GraphicsContext.
Public Member Functions | |
CameraContext () | |
constructor | |
virtual | ~CameraContext () |
destructor | |
Public Member Functions inherited from Graphics::GraphicsContext | |
GraphicsContext () | |
constructor | |
virtual | ~GraphicsContext () |
destructor | |
Static Public Member Functions | |
static void | Create () |
create context | |
static void | UpdateCameras (const Graphics::FrameContext &ctx) |
runs before frame is updated | |
static void | SetupProjectionFov (const Graphics::GraphicsEntityId id, float aspect, float fov, float znear, float zfar) |
setup as projection and fov | |
static void | SetupOrthographic (const Graphics::GraphicsEntityId id, float width, float height, float znear, float zfar) |
setup as ortographic | |
static void | SetView (const Graphics::GraphicsEntityId id, const Math::mat4 &mat) |
set view | |
static const Math::mat4 & | GetView (const Graphics::GraphicsEntityId id) |
get view | |
static const Math::mat4 | GetTransform (const Graphics::GraphicsEntityId id) |
get transform | |
static const Math::mat4 & | GetProjection (const Graphics::GraphicsEntityId id) |
get projection | |
static const Math::mat4 & | GetViewProjection (const Graphics::GraphicsEntityId id) |
get view-projection | |
static const CameraSettings & | GetSettings (const Graphics::GraphicsEntityId id) |
get settings | |
static void | OnWindowResized (const CoreGraphics::WindowId windowId, SizeT width, SizeT height) |
called if the window size has changed | |
static Graphics::GraphicsEntityId | GetLODCamera () |
get the LOD camera | |
static void | SetLODCamera (const Graphics::GraphicsEntityId id) |
set the LOD camera | |
Private Types | |
enum | { Camera_Settings , Camera_Projection , Camera_View , Camera_ViewProjection } |
typedef Ids::IdAllocator< Graphics::CameraSettings, Math::mat4, Math::mat4, Math::mat4 > | CameraAllocator |
Private Member Functions | |
__DeclareContext () | |
Static Private Member Functions | |
static Graphics::ContextEntityId | Alloc () |
allocate a new slice for this context | |
static void | Dealloc (const Graphics::ContextEntityId id) |
deallocate a slice | |
Static Private Attributes | |
static CameraAllocator | cameraAllocator |
static Graphics::GraphicsEntityId | lodCamera |
Additional Inherited Members | |
Static Protected Member Functions inherited from Graphics::GraphicsContext | |
static void | InternalRegisterEntity (const Graphics::GraphicsEntityId id, Graphics::GraphicsContextState &&state) |
static void | InternalDeregisterEntity (const Graphics::GraphicsEntityId id, Graphics::GraphicsContextState &&state) |
template<class ID_ALLOCATOR > | |
static void | InternalDefragment (ID_ALLOCATOR &allocator, Graphics::GraphicsContextState &&state) |
|
private |
|
private |
Graphics::CameraContext::CameraContext | ( | ) |
constructor
|
virtual |
destructor
|
private |
|
inlinestaticprivate |
allocate a new slice for this context
|
static |
create context
|
inlinestaticprivate |
deallocate a slice
|
static |
get the LOD camera
|
static |
get projection
|
static |
get settings
|
static |
get transform
|
static |
get view
|
static |
get view-projection
|
static |
called if the window size has changed
|
static |
set the LOD camera
|
static |
setup as ortographic
|
static |
setup as projection and fov
|
static |
set view
|
static |
runs before frame is updated
|
staticprivate |
|
staticprivate |