14#include <lagrange/ui/Entity.h>
15#include <lagrange/ui/components/Layer.h>
16#include <lagrange/ui/types/Camera.h>
17#include <lagrange/ui/types/Color.h>
18#include <lagrange/ui/types/FrameBuffer.h>
19#include <unordered_map>
31 Entity camera_reference = NullEntity;
39 bool auto_nearfar =
true;
41 std::set<RenderPassBase*> selected_passes;
42 std::shared_ptr<FrameBuffer> fbo;
49 std::shared_ptr<Material> material_override;
52 std::map<std::string, std::shared_ptr<Material>> post_process_effects;
55 GLbitfield clear_bits = GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT;
60 if (r.valid(viewport.camera_reference)) {
61 return r.get<
Camera>(viewport.camera_reference);
63 return viewport.computed_camera;
67inline const Camera& get_viewport_camera(
const Registry& r,
const ViewportComponent& viewport)
69 if (r.valid(viewport.camera_reference)) {
70 return r.get<Camera>(viewport.camera_reference);
72 return viewport.computed_camera;
76inline Camera& get_viewport_camera(Registry& r, Entity e)
78 assert(r.all_of<ViewportComponent>(e));
79 return get_viewport_camera(r, r.get<ViewportComponent>(e));
82inline const Camera& get_viewport_camera(
const Registry& r, Entity e)
84 assert(r.all_of<ViewportComponent>(e));
85 return get_viewport_camera(r, r.get<ViewportComponent>(e));
Camera class.
Definition: Camera.h:38
Lagrange UI Viewer and mini 3D engine.
Definition: AcceleratedPicking.h:22
Main namespace for Lagrange.
Definition: AABBIGL.h:30
Definition: Viewport.h:30