Class camera¶
Defined in File camera.hpp
Class Documentation¶
-
class
legion::rendering
::
camera
¶ Camera component.
Public Functions
-
inline void
set_projection
(float fov, float nearz, float farz)¶ Set the projection variables of the camera.
- Parameters
fov
: Horizontal field of view in degrees.nearz
: Near plane distance from the camera.farz
: Far plane distance from the camera.
-
inline math::mat4
get_projection
(float ratio)¶ Get the projection matrix for a certain aspect ratio.
- Parameters
ratio
: Aspect ratio (width / height)
Public Members
-
ecs::component_handle<app::window>
targetWindow
= ecs::component_handle<app::window>(world_entity_id)¶
-
framebuffer
renderTarget
= framebuffer()¶
-
math::color
clearColor
= math::colors::cornflower¶
-
float
fov
¶
-
float
nearz
¶
-
float
farz
¶
Friends
- friend class OldRenderer
- friend class Renderer
-
struct
camera_input
¶ Public Functions
-
inline
camera_input
(math::mat4 view, math::mat4 proj, math::vec3 pos, math::vec3 vdir, float nearz, float farz, math::ivec2 viewportSize)¶
-
inline void
bind
(material_handle &materialHandle) const¶
-
inline
-
inline void