7#include "core/math/bounds.h"
28 ScreenView() =
default;
29 ~ScreenView() =
default;
31 ScreenView(
const ScreenView& other) =
default;
32 ScreenView& operator=(
const ScreenView& other) =
default;
34 ScreenView(ScreenView && other) =
default;
35 ScreenView& operator=(ScreenView && other) =
default;
48 bool valid()
const {
return m_valid; }
57 std::optional<Math::Ray>
rayThrough(
const glm::vec2& windowPoint)
const;
69 std::optional<glm::vec2>
toCanvas(
const glm::vec3& world,
const UICanvas& canvas)
const;
73 glm::mat4 m_viewProjection{1.0f};
74 glm::vec2 m_origin{0.0f};
75 glm::vec2 m_size{0.0f};
76 float m_pointerScale = 1.0f;
What an authoring host tells the engine about the frame it draws over.
Definition host_chrome.h:18
Central registry managing entities and an open set of component types.
Definition scene.h:29
static ScreenView of(const Scene &scene, const WindowManager &window, const HostChrome &chrome)
The view as it stands now.
std::optional< glm::vec2 > toCanvas(const glm::vec3 &world, const UICanvas &canvas) const
Where a point of the world lands on a canvas, in the canvas's own pixels.
std::optional< Math::Ray > rayThrough(const glm::vec2 &windowPoint) const
The ray from the camera through a point of the window.
Owns the application's window, its WindowSurface, input, and frame limiting.
Definition window_manager.h:69
Root of a screen-space UI layer.
Definition ui_canvas.h:18