Unravel Engine C++ Reference
|
Class that contains core camera data, used for rendering and other purposes. More...
#include <camera_component.h>
Public Member Functions | |
camera_component () | |
Default constructor for camera_component. | |
void | set_fov (float fov_degrees) |
Sets the field of view (FOV). | |
void | set_near_clip (float distance) |
Sets the near clipping distance. | |
void | set_far_clip (float distance) |
Sets the far clipping distance. | |
void | set_projection_mode (projection_mode mode) |
Sets the projection mode. | |
auto | get_fov () const -> float |
Gets the field of view (FOV). | |
auto | get_near_clip () const -> float |
Gets the near clipping distance. | |
auto | get_far_clip () const -> float |
Gets the far clipping distance. | |
auto | get_projection_mode () const -> projection_mode |
Gets the projection mode. | |
auto | get_camera () -> camera & |
Gets the camera object. | |
auto | get_camera () const -> const camera & |
Gets the camera object (const version). | |
void | update (const math::transform &t) |
Updates the camera with the given transform. | |
void | set_viewport_size (const usize32_t &size) |
Sets the viewport size. | |
auto | get_viewport_size () const -> const usize32_t & |
Gets the viewport size. | |
auto | get_ortho_size () const -> float |
Gets the orthographic size. | |
void | set_ortho_size (float size) |
Sets the orthographic size. | |
auto | get_ppu () const -> float |
Gets the pixels per unit (PPU). | |
auto | get_render_view () -> gfx::render_view & |
Gets the render view. | |
auto | get_render_view () const -> const gfx::render_view & |
auto | get_storage () -> camera_storage & |
Gets the camera storage. | |
auto | get_pipeline_data () -> pipeline_camera & |
auto | get_pipeline_data () const -> const pipeline_camera & |
auto | get_render_include_mask () const -> layer_mask |
Gets the render include mask. | |
void | set_render_include_mask (layer_mask mask) |
Sets the render include mask. | |
auto | get_render_exclude_mask () const -> layer_mask |
Gets the render exclude mask. | |
void | set_render_exclude_mask (layer_mask mask) |
Sets the render exclude mask. | |
auto | get_render_mask () const -> layer_mask |
Gets the effective render mask (include - exclude). | |
![]() | |
void | touch () |
Marks the component as 'touched'. | |
Additional Inherited Members | |
![]() | |
using | base |
![]() | |
bool | eto {} |
Disable empty type optimizations. | |
![]() | |
static constexpr bool | in_place_delete |
Indicates if the component can be deleted in place. | |
Class that contains core camera data, used for rendering and other purposes.
Definition at line 21 of file camera_component.h.
unravel::camera_component::camera_component | ( | ) |
Default constructor for camera_component.
Definition at line 5 of file camera_component.cpp.
auto unravel::camera_component::get_camera | ( | ) | -> camera& |
Gets the camera object.
Definition at line 107 of file camera_component.cpp.
auto unravel::camera_component::get_camera | ( | ) | const -> const camera& |
Gets the camera object (const version).
Definition at line 112 of file camera_component.cpp.
auto unravel::camera_component::get_far_clip | ( | ) | const -> float |
Gets the far clipping distance.
Definition at line 97 of file camera_component.cpp.
auto unravel::camera_component::get_fov | ( | ) | const -> float |
Gets the field of view (FOV).
Definition at line 89 of file camera_component.cpp.
auto unravel::camera_component::get_near_clip | ( | ) | const -> float |
Gets the near clipping distance.
Definition at line 93 of file camera_component.cpp.
auto unravel::camera_component::get_ortho_size | ( | ) | const -> float |
Gets the orthographic size.
Definition at line 29 of file camera_component.cpp.
auto unravel::camera_component::get_pipeline_data | ( | ) | -> pipeline_camera& |
Definition at line 59 of file camera_component.cpp.
auto unravel::camera_component::get_pipeline_data | ( | ) | const -> const pipeline_camera& |
Definition at line 64 of file camera_component.cpp.
auto unravel::camera_component::get_ppu | ( | ) | const -> float |
Gets the pixels per unit (PPU).
Definition at line 39 of file camera_component.cpp.
auto unravel::camera_component::get_projection_mode | ( | ) | const -> projection_mode |
Gets the projection mode.
Definition at line 102 of file camera_component.cpp.
auto unravel::camera_component::get_render_exclude_mask | ( | ) | const -> layer_mask |
Gets the render exclude mask.
Definition at line 127 of file camera_component.cpp.
auto unravel::camera_component::get_render_include_mask | ( | ) | const -> layer_mask |
Gets the render include mask.
Definition at line 117 of file camera_component.cpp.
auto unravel::camera_component::get_render_mask | ( | ) | const -> layer_mask |
Gets the effective render mask (include - exclude).
Definition at line 137 of file camera_component.cpp.
auto unravel::camera_component::get_render_view | ( | ) | -> gfx::render_view& |
Gets the render view.
Definition at line 44 of file camera_component.cpp.
auto unravel::camera_component::get_render_view | ( | ) | const -> const gfx::render_view& |
Definition at line 49 of file camera_component.cpp.
auto unravel::camera_component::get_storage | ( | ) | -> camera_storage& |
Gets the camera storage.
Definition at line 54 of file camera_component.cpp.
auto unravel::camera_component::get_viewport_size | ( | ) | const -> const usize32_t& |
Gets the viewport size.
Definition at line 24 of file camera_component.cpp.
void unravel::camera_component::set_far_clip | ( | float | distance | ) |
Sets the far clipping distance.
[in] | distance | The far clipping distance. |
Definition at line 79 of file camera_component.cpp.
void unravel::camera_component::set_fov | ( | float | fov_degrees | ) |
Sets the field of view (FOV).
[in] | fov_degrees | The FOV in degrees. |
Definition at line 69 of file camera_component.cpp.
void unravel::camera_component::set_near_clip | ( | float | distance | ) |
Sets the near clipping distance.
[in] | distance | The near clipping distance. |
Definition at line 74 of file camera_component.cpp.
void unravel::camera_component::set_ortho_size | ( | float | size | ) |
Sets the orthographic size.
[in] | size | The orthographic size to set. |
Definition at line 34 of file camera_component.cpp.
void unravel::camera_component::set_projection_mode | ( | projection_mode | mode | ) |
Sets the projection mode.
[in] | mode | The projection mode to set. |
Definition at line 84 of file camera_component.cpp.
void unravel::camera_component::set_render_exclude_mask | ( | layer_mask | mask | ) |
Sets the render exclude mask.
mask | The render exclude mask to set. |
Definition at line 132 of file camera_component.cpp.
void unravel::camera_component::set_render_include_mask | ( | layer_mask | mask | ) |
Sets the render include mask.
mask | The render include mask to set. |
Definition at line 122 of file camera_component.cpp.
void unravel::camera_component::set_viewport_size | ( | const usize32_t & | size | ) |
Sets the viewport size.
[in] | size | The size of the viewport. |
Definition at line 19 of file camera_component.cpp.
void unravel::camera_component::update | ( | const math::transform & | t | ) |
Updates the camera with the given transform.
[in] | t | The transform to update the camera with. |
Definition at line 10 of file camera_component.cpp.