|
Unravel Engine C++ Reference
|
Class representing a camera. Contains functionality for manipulating and updating a camera. It should not be used as a standalone class - see camera_component and the entity system. More...
#include <camera.h>
Public Member Functions | |
| void | set_projection_mode (projection_mode mode) |
| Sets the current projection mode for this camera (i.e. orthographic or perspective). | |
| void | set_fov (float degrees) |
| Sets the field of view angle of this camera (perspective only). | |
| void | set_near_clip (float distance) |
| Sets the near plane distance. | |
| void | set_far_clip (float distance) |
| Sets the far plane distance. | |
| void | set_orthographic_size (float size) |
| Sets the half of the vertical size of the viewing volume in world units. | |
| auto | get_projection_mode () const -> projection_mode |
| Retrieves the current projection mode for this camera. | |
| auto | get_fov () const -> float |
| Retrieves the current field of view angle in degrees. | |
| auto | get_near_clip () const -> float |
| Retrieves the distance from the camera to the near clip plane. | |
| auto | get_far_clip () const -> float |
| Retrieves the distance from the camera to the far clip plane. | |
| auto | get_ortho_size () const -> float |
| Retrieves the orthographic size. | |
| auto | get_zoom_factor () const -> float |
| Retrieves the zoom factor. | |
| auto | get_ppu () const -> float |
| Retrieves the pixels per unit (PPU). | |
| void | set_viewport_size (const usize32_t &viewport_size) |
| Sets the size of the viewport. | |
| void | set_viewport_pos (const ipoint32_t &viewport_pos) |
| Sets the position of the viewport. | |
| auto | get_viewport_size () const -> const usize32_t & |
| Retrieves the size of the viewport. | |
| auto | get_viewport_pos () const -> const ipoint32_t & |
| Retrieves the position of the viewport. | |
| void | set_aspect_ratio (float aspect, bool locked=false) |
| Sets the aspect ratio to be used for generating the horizontal FOV angle (perspective only). | |
| auto | get_aspect_ratio () const -> float |
| Retrieves the aspect ratio used to generate the horizontal FOV angle. | |
| auto | is_aspect_locked () const -> bool |
| Determines if the aspect ratio is currently being updated by the render driver. | |
| auto | is_frustum_locked () const -> bool |
| Checks if the frustum is currently locked. | |
| void | lock_frustum (bool locked) |
| Locks or unlocks the frustum. | |
| auto | get_frustum () const -> const math::frustum & |
| Retrieves the current camera object frustum. | |
| auto | get_clipping_volume () const -> const math::frustum & |
| Retrieves the frustum representing the space between the camera position and its near plane. | |
| auto | get_projection () const -> const math::transform & |
| Retrieves the current projection matrix. | |
| auto | get_prev_projection () const -> const math::transform & |
| auto | get_view () const -> const math::transform & |
| Retrieves the current view matrix. | |
| auto | get_prev_view () const -> const math::transform & |
| auto | get_view_inverse () const -> const math::transform & |
| auto | get_view_relative () const -> const math::transform & |
| auto | get_prev_view_relative () const -> const math::transform & |
| auto | get_view_inverse_relative () const -> const math::transform & |
| auto | get_prev_view_projection () const -> math::transform |
| Retrieves the previous view matrix. | |
| auto | get_prev_view_projection_relative () const -> math::transform |
| auto | get_taa_prev_view_projection () const -> math::transform |
| View-projection used for the previous rendered frame (before the latest jitter sample). | |
| auto | get_view_projection () const -> math::transform |
| Retrieves the current view-projection matrix. | |
| auto | get_view_projection_relative () const -> math::transform |
| void | record_current_matrices () |
| Makes a copy of the current view and projection matrices before they are changed. | |
| void | set_aa_data (const usize32_t &viewport_size, std::uint32_t temporal_frame_index, std::uint32_t temporal_aa_samples, taa_jitter_mode jitter_mode=taa_jitter_mode::progressive_golden, float jitter_amplitude=1.0f, float jitter_temporal_phase_scale=1.0f) |
| Sets the current jitter value for temporal anti-aliasing. | |
| auto | get_aa_data () const -> const math::vec4 & |
| Retrieves the anti-aliasing data. | |
| auto | classify_aabb (const math::bbox &bounds) const -> math::volume_query |
| Determines if the specified AABB falls within the frustum. | |
| auto | test_aabb (const math::bbox &bounds) const -> bool |
| Tests if the specified AABB is within the frustum. | |
| auto | classify_obb (const math::bbox &bounds, const math::transform &t) const -> math::volume_query |
| Determines if the specified OBB is within the frustum. | |
| auto | test_obb (const math::bbox &bounds, const math::transform &t) const -> bool |
| Tests if the specified OBB is within the frustum. | |
| auto | test_billboard (float size, const math::transform &t) const -> bool |
| auto | viewport_to_ray (const math::vec2 &point, math::vec3 &vec_ray_start, math::vec3 &vec_ray_dir) const -> bool |
| Converts the specified screen position into a ray origin and direction vector. | |
| auto | viewport_to_world (const math::vec2 &point, const math::plane &plane, math::vec3 &position_out, bool clip) const -> bool |
| Converts a screen position into a world space position on the specified plane. | |
| auto | project_to_quad (const math::vec2 &viewport_point, const math::transform &quad_transform, uint32_t quad_width, uint32_t quad_height, math::vec2 &pixel_out) const -> bool |
| Raycasts from viewport point onto a quad plane and returns pixel coordinates. | |
| auto | viewport_to_major_axis (const math::vec2 &point, const math::vec3 &axis_origin, math::vec3 &position_out, math::vec3 &major_axis_out) const -> bool |
| Converts a screen position into a world space intersection point on a major axis plane. | |
| auto | viewport_to_major_axis (const math::vec2 &point, const math::vec3 &axis_origin, const math::vec3 &align_normal, math::vec3 &position_out, math::vec3 &major_axis_out) const -> bool |
| Converts a screen position into a world space intersection point on a major axis plane. | |
| auto | viewport_to_camera (const math::vec3 &point, math::vec3 &position_out) const -> bool |
| Converts a screen position into a camera space position at the near plane. | |
| auto | world_to_viewport (const math::vec3 &pos) const -> math::vec3 |
| Transforms a point from world space into screen space. | |
| auto | estimate_zoom_factor (const math::plane &plane) const -> float |
| Estimates the zoom factor based on the specified plane. | |
| auto | estimate_zoom_factor (const math::vec3 &position) const -> float |
| Estimates the zoom factor based on the specified position. | |
| auto | estimate_zoom_factor (const math::plane &plane, float maximum_value) const -> float |
| Estimates the zoom factor based on the specified plane, constrained by a maximum value. | |
| auto | estimate_zoom_factor (const math::vec3 &position, float maximum_value) const -> float |
| Estimates the zoom factor based on the specified position, constrained by a maximum value. | |
| auto | estimate_pick_tolerance (float pixel_tolerance, const math::vec3 &reference_position, const math::transform &object_transform) const -> math::vec3 |
| Estimates the pick tolerance based on the pixel tolerance and reference position. | |
| void | look_at (const math::vec3 &eye, const math::vec3 &at) |
| Sets the camera to look at a specified target. | |
| void | look_at (const math::vec3 &eye, const math::vec3 &at, const math::vec3 &up) |
| Sets the camera to look at a specified target with an up vector. | |
| auto | get_position () const -> const math::vec3 & |
| Retrieves the current position of the camera. | |
| auto | x_unit_axis () const -> math::vec3 |
| Retrieves the x-axis unit vector of the camera's local coordinate system. | |
| auto | y_unit_axis () const -> math::vec3 |
| Retrieves the y-axis unit vector of the camera's local coordinate system. | |
| auto | z_unit_axis () const -> math::vec3 |
| Retrieves the z-axis unit vector of the camera's local coordinate system. | |
| auto | get_local_bounding_box () -> math::bbox |
| Retrieves the bounding box of this object. | |
| void | touch () |
| Marks the camera as modified. | |
Public Member Functions inherited from crtp_meta_type< camera > | |
| virtual auto | get_meta_type () const -> entt::meta_type |
| auto | is () const -> bool |
| auto | is (const entt::meta_type &type) const -> bool |
| virtual auto | as_derived () -> entt::meta_any |
Static Public Member Functions | |
| static auto | get_face_camera (std::uint32_t face, const math::transform &transform) -> camera |
| Retrieves a camera for one of six cube faces. | |
Static Public Member Functions inherited from crtp_meta_type< camera > | |
| static auto | get_static_meta_type () -> entt::meta_type |
Protected Attributes | |
| math::vec4 | aa_data_ = {0.0f, 0.0f, 0.0f, 0.0f} |
| Anti-aliasing data. | |
| math::transform | view_ |
| Cached view matrix. | |
| math::transform | view_inverse_ |
| math::transform | view_relative_ |
| math::transform | view_inverse_relative_ |
| math::transform | projection_ |
| Cached projection matrix. | |
| math::transform | last_view_ |
| Cached "previous" view matrix. | |
| math::transform | last_view_relative_ |
| math::transform | last_projection_ |
| Cached "previous" projection matrix. | |
| math::transform | taa_prev_view_ |
| Snapshot for temporal reprojection: view/projection before advancing jitter (see set_aa_data). | |
| math::transform | taa_prev_projection_ |
| math::frustum | frustum_ |
| Details regarding the camera frustum. | |
| math::frustum | clipping_volume_ |
| The near clipping volume (area of space between the camera position and the near plane). | |
| projection_mode | projection_mode_ = projection_mode::perspective |
| The type of projection currently selected for this camera. | |
| float | fov_ = 60.0f |
| Vertical degrees angle (perspective only). | |
| float | near_clip_ = 0.1f |
| Near clip plane Distance. | |
| float | far_clip_ = 1000.0f |
| Far clip plane Distance. | |
| float | ortho_size_ = 5 |
| camera's half-size when in orthographic mode. | |
| float | aspect_ratio_ = 1.0f |
| The aspect ratio used to generate the correct horizontal degrees (perspective only) | |
| ipoint32_t | viewport_pos_ = {0, 0} |
| Viewport position. | |
| usize32_t | viewport_size_ = {0, 0} |
| Viewport size. | |
| bool | view_dirty_ = true |
| View matrix dirty ? | |
| bool | projection_dirty_ = true |
| Projection matrix dirty ? | |
| bool | aspect_dirty_ = true |
| Has the aspect ratio changed? | |
| bool | frustum_dirty_ = true |
| Are the frustum planes dirty ? | |
| bool | aspect_locked_ = false |
| Should the aspect ratio be automatically updated by the render driver? | |
| bool | frustum_locked_ = false |
| Is the frustum locked? | |
Class representing a camera. Contains functionality for manipulating and updating a camera. It should not be used as a standalone class - see camera_component and the entity system.
| auto unravel::camera::classify_aabb | ( | const math::bbox & | bounds | ) | const -> math::volume_query |
Determines if the specified AABB falls within the frustum.
| bounds | The AABB to test. |
Definition at line 424 of file camera.cpp.
| auto unravel::camera::classify_obb | ( | const math::bbox & | bounds, |
| const math::transform & | t ) const -> math::volume_query |
Determines if the specified OBB is within the frustum.
| bounds | The OBB to test. |
| t | The transformation to apply to the OBB. |
Definition at line 442 of file camera.cpp.
| auto unravel::camera::estimate_pick_tolerance | ( | float | pixel_tolerance, |
| const math::vec3 & | reference_position, | ||
| const math::transform & | object_transform ) const -> math::vec3 |
Estimates the pick tolerance based on the pixel tolerance and reference position.
| pixel_tolerance | The pixel tolerance. |
| reference_position | The reference position. |
| object_transform | The transformation to apply to the object. |
Definition at line 745 of file camera.cpp.
| auto unravel::camera::estimate_zoom_factor | ( | const math::plane & | plane | ) | const -> float |
Estimates the zoom factor based on the specified plane.
| plane | The reference plane. |
Definition at line 675 of file camera.cpp.
| auto unravel::camera::estimate_zoom_factor | ( | const math::plane & | plane, |
| float | maximum_value ) const -> float |
Estimates the zoom factor based on the specified plane, constrained by a maximum value.
| plane | The reference plane. |
| maximum_value | The maximum zoom factor value. |
Definition at line 708 of file camera.cpp.
| auto unravel::camera::estimate_zoom_factor | ( | const math::vec3 & | position | ) | const -> float |
Estimates the zoom factor based on the specified position.
Given the current viewport type and projection mode, estimate the "zoom" factor that can be used for scaling various operations relative to the "scale" of an object as it appears in the viewport at the specified position.
| position | The reference position. |
Definition at line 703 of file camera.cpp.
| auto unravel::camera::estimate_zoom_factor | ( | const math::vec3 & | position, |
| float | maximum_value ) const -> float |
Estimates the zoom factor based on the specified position, constrained by a maximum value.
| position | The reference position. |
| maximum_value | The maximum zoom factor value. |
Definition at line 728 of file camera.cpp.
| auto unravel::camera::get_aa_data | ( | ) | const -> const math::vec4& |
Retrieves the anti-aliasing data.
Definition at line 858 of file camera.cpp.
| auto unravel::camera::get_aspect_ratio | ( | ) | const -> float |
Retrieves the aspect ratio used to generate the horizontal FOV angle.
Definition at line 185 of file camera.cpp.
| auto unravel::camera::get_clipping_volume | ( | ) | const -> const math::frustum& |
Retrieves the frustum representing the space between the camera position and its near plane.
Definition at line 412 of file camera.cpp.
|
static |
Retrieves a camera for one of six cube faces.
| face | The index of the cube face. |
| transform | The transformation to apply. |
Definition at line 872 of file camera.cpp.
| auto unravel::camera::get_far_clip | ( | ) | const -> float |
Retrieves the distance from the camera to the far clip plane.
Definition at line 69 of file camera.cpp.
| auto unravel::camera::get_fov | ( | ) | const -> float |
Retrieves the current field of view angle in degrees.
Definition at line 59 of file camera.cpp.
| auto unravel::camera::get_frustum | ( | ) | const -> const math::frustum& |
Retrieves the current camera object frustum.
Definition at line 372 of file camera.cpp.
| auto unravel::camera::get_local_bounding_box | ( | ) | -> math::bbox |
Retrieves the bounding box of this object.
Definition at line 147 of file camera.cpp.
| auto unravel::camera::get_near_clip | ( | ) | const -> float |
Retrieves the distance from the camera to the near clip plane.
Definition at line 64 of file camera.cpp.
| auto unravel::camera::get_ortho_size | ( | ) | const -> float |
Retrieves the orthographic size.
Definition at line 74 of file camera.cpp.
| auto unravel::camera::get_position | ( | ) | const -> const math::vec3& |
Retrieves the current position of the camera.
Definition at line 353 of file camera.cpp.
| auto unravel::camera::get_ppu | ( | ) | const -> float |
Retrieves the pixels per unit (PPU).
Definition at line 21 of file camera.cpp.
| auto unravel::camera::get_prev_projection | ( | ) | const -> const math::transform& |
Definition at line 273 of file camera.cpp.
| auto unravel::camera::get_prev_view | ( | ) | const -> const math::transform& |
Definition at line 283 of file camera.cpp.
| auto unravel::camera::get_prev_view_projection | ( | ) | const -> math::transform |
Retrieves the previous view matrix.
Definition at line 313 of file camera.cpp.
| auto unravel::camera::get_prev_view_projection_relative | ( | ) | const -> math::transform |
Definition at line 328 of file camera.cpp.
| auto unravel::camera::get_prev_view_relative | ( | ) | const -> const math::transform& |
Definition at line 293 of file camera.cpp.
| auto unravel::camera::get_projection | ( | ) | const -> const math::transform& |
Retrieves the current projection matrix.
Definition at line 205 of file camera.cpp.
| auto unravel::camera::get_projection_mode | ( | ) | const -> projection_mode |
Retrieves the current projection mode for this camera.
Definition at line 54 of file camera.cpp.
| auto unravel::camera::get_taa_prev_view_projection | ( | ) | const -> math::transform |
View-projection used for the previous rendered frame (before the latest jitter sample).
Updated inside set_aa_data(); use for temporal reprojection (TAA) so history aligns with jittered projection.
Definition at line 318 of file camera.cpp.
| auto unravel::camera::get_view | ( | ) | const -> const math::transform& |
Retrieves the current view matrix.
Definition at line 278 of file camera.cpp.
| auto unravel::camera::get_view_inverse | ( | ) | const -> const math::transform& |
Definition at line 298 of file camera.cpp.
| auto unravel::camera::get_view_inverse_relative | ( | ) | const -> const math::transform& |
Definition at line 303 of file camera.cpp.
| auto unravel::camera::get_view_projection | ( | ) | const -> math::transform |
Retrieves the current view-projection matrix.
Definition at line 308 of file camera.cpp.
| auto unravel::camera::get_view_projection_relative | ( | ) | const -> math::transform |
Definition at line 323 of file camera.cpp.
| auto unravel::camera::get_view_relative | ( | ) | const -> const math::transform& |
Definition at line 288 of file camera.cpp.
| auto unravel::camera::get_viewport_pos | ( | ) | const -> const ipoint32_t& |
Retrieves the position of the viewport.
Definition at line 42 of file camera.cpp.
| auto unravel::camera::get_viewport_size | ( | ) | const -> const usize32_t& |
Retrieves the size of the viewport.
Definition at line 37 of file camera.cpp.
| auto unravel::camera::get_zoom_factor | ( | ) | const -> float |
| auto unravel::camera::is_aspect_locked | ( | ) | const -> bool |
Determines if the aspect ratio is currently being updated by the render driver.
Definition at line 190 of file camera.cpp.
| auto unravel::camera::is_frustum_locked | ( | ) | const -> bool |
Checks if the frustum is currently locked.
Definition at line 195 of file camera.cpp.
| void unravel::camera::lock_frustum | ( | bool | locked | ) |
Locks or unlocks the frustum.
| locked | Whether the frustum should be locked. |
Definition at line 200 of file camera.cpp.
| void unravel::camera::look_at | ( | const math::vec3 & | eye, |
| const math::vec3 & | at ) |
Sets the camera to look at a specified target.
| eye | The eye position. |
| at | The target position. |
Definition at line 333 of file camera.cpp.
| void unravel::camera::look_at | ( | const math::vec3 & | eye, |
| const math::vec3 & | at, | ||
| const math::vec3 & | up ) |
Sets the camera to look at a specified target with an up vector.
| eye | The eye position. |
| at | The target position. |
| vUp | The up vector. |
Definition at line 338 of file camera.cpp.
| auto unravel::camera::project_to_quad | ( | const math::vec2 & | viewport_point, |
| const math::transform & | quad_transform, | ||
| uint32_t | quad_width, | ||
| uint32_t | quad_height, | ||
| math::vec2 & | pixel_out ) const -> bool |
Raycasts from viewport point onto a quad plane and returns pixel coordinates.
Projects the viewport point through the camera onto the quad's plane, then converts the world intersection to local quad space and finally to document pixel coordinates. Assumes the quad is a unit quad (-0.5 to 0.5) scaled by the transform.
| viewport_point | The viewport/screen position. |
| quad_transform | The quad's model transform (world * scale for world size). |
| quad_width | The quad width in pixels. |
| quad_height | The quad height in pixels. |
| pixel_out | The output pixel coordinates (0..width, 0..height), or (-1,-1) if no hit. |
Definition at line 582 of file camera.cpp.
| void unravel::camera::record_current_matrices | ( | ) |
Makes a copy of the current view and projection matrices before they are changed.
Definition at line 759 of file camera.cpp.
| void unravel::camera::set_aa_data | ( | const usize32_t & | viewport_size, |
| std::uint32_t | temporal_frame_index, | ||
| std::uint32_t | temporal_aa_samples, | ||
| taa_jitter_mode | jitter_mode = taa_jitter_mode::progressive_golden, | ||
| float | jitter_amplitude = 1.0f, | ||
| float | jitter_temporal_phase_scale = 1.0f ) |
Sets the current jitter value for temporal anti-aliasing.
| viewport_size | Viewport size (pixels) for scaling jitter into clip space. |
| temporal_frame_index | Monotonic frame counter (e.g. render frame). Drives progressive subpixel jitter (no short-period MSAA-style cycling); avoid large discontinuities. |
| temporal_aa_samples | Values > 1 enable jitter; count is stored for UI / future tuning. |
| jitter_mode | Which subpixel sequence to use (see taa_jitter_mode). |
| jitter_amplitude | Scales raw subpixel offsets before clip scaling; 1 = full ~±½ pixel. Lower values (e.g. 0.5–0.7) reduce visible whole-frame shake at some AA cost. |
| jitter_temporal_phase_scale | Multiplies progression speed for golden / Halton / R2 (1 = legacy). MSAA rotating modes ignore this and advance one subsample per frame. |
Definition at line 767 of file camera.cpp.
| void unravel::camera::set_aspect_ratio | ( | float | aspect, |
| bool | locked = false ) |
Sets the aspect ratio to be used for generating the horizontal FOV angle (perspective only).
| aspect | The aspect ratio to set. |
| locked | Whether the aspect ratio should be locked. |
Definition at line 167 of file camera.cpp.
| void unravel::camera::set_far_clip | ( | float | distance | ) |
Sets the far plane distance.
| distance | The distance to the far clipping plane. |
Definition at line 127 of file camera.cpp.
| void unravel::camera::set_fov | ( | float | degrees | ) |
Sets the field of view angle of this camera (perspective only).
| degrees | The field of view in degrees. |
Definition at line 79 of file camera.cpp.
| void unravel::camera::set_near_clip | ( | float | distance | ) |
Sets the near plane distance.
| distance | The distance to the near clipping plane. |
Definition at line 107 of file camera.cpp.
| void unravel::camera::set_orthographic_size | ( | float | size | ) |
Sets the half of the vertical size of the viewing volume in world units.
| size | The size to set. |
Definition at line 47 of file camera.cpp.
| void unravel::camera::set_projection_mode | ( | projection_mode | mode | ) |
Sets the current projection mode for this camera (i.e. orthographic or perspective).
| mode | The projection mode to set. |
Definition at line 93 of file camera.cpp.
| void unravel::camera::set_viewport_pos | ( | const ipoint32_t & | viewport_pos | ) |
Sets the position of the viewport.
| viewportPos | The position of the viewport. |
Definition at line 32 of file camera.cpp.
| void unravel::camera::set_viewport_size | ( | const usize32_t & | viewport_size | ) |
Sets the size of the viewport.
| viewportSize | The size of the viewport. |
Definition at line 26 of file camera.cpp.
| auto unravel::camera::test_aabb | ( | const math::bbox & | bounds | ) | const -> bool |
Tests if the specified AABB is within the frustum.
| bounds | The AABB to test. |
Definition at line 433 of file camera.cpp.
| auto unravel::camera::test_billboard | ( | float | size, |
| const math::transform & | t ) const -> bool |
Definition at line 460 of file camera.cpp.
| auto unravel::camera::test_obb | ( | const math::bbox & | bounds, |
| const math::transform & | t ) const -> bool |
Tests if the specified OBB is within the frustum.
| bounds | The OBB to test. |
| t | The transformation to apply to the OBB. |
Definition at line 451 of file camera.cpp.
| void unravel::camera::touch | ( | ) |
Marks the camera as modified.
Definition at line 863 of file camera.cpp.
| auto unravel::camera::viewport_to_camera | ( | const math::vec3 & | point, |
| math::vec3 & | position_out ) const -> bool |
Converts a screen position into a camera space position at the near plane.
| point | The screen position. |
| position_out | The output camera space position. |
Definition at line 661 of file camera.cpp.
| auto unravel::camera::viewport_to_major_axis | ( | const math::vec2 & | point, |
| const math::vec3 & | axis_origin, | ||
| const math::vec3 & | align_normal, | ||
| math::vec3 & | position_out, | ||
| math::vec3 & | major_axis_out ) const -> bool |
Converts a screen position into a world space intersection point on a major axis plane.
| point | The screen position. |
| axis_origin | The origin of the axis. |
| align_normal | The alignment normal. |
| position_out | The output world space position. |
| major_axis_out | The output major axis. |
Definition at line 618 of file camera.cpp.
| auto unravel::camera::viewport_to_major_axis | ( | const math::vec2 & | point, |
| const math::vec3 & | axis_origin, | ||
| math::vec3 & | position_out, | ||
| math::vec3 & | major_axis_out ) const -> bool |
Converts a screen position into a world space intersection point on a major axis plane.
| point | The screen position. |
| axis_origin | The origin of the axis. |
| position_out | The output world space position. |
| major_axis_out | The output major axis. |
Definition at line 610 of file camera.cpp.
| auto unravel::camera::viewport_to_ray | ( | const math::vec2 & | point, |
| math::vec3 & | vec_ray_start, | ||
| math::vec3 & | vec_ray_dir ) const -> bool |
Converts the specified screen position into a ray origin and direction vector.
| point | The screen position. |
| rayOriginOut | The output ray origin. |
| rayDirectionOut | The output ray direction. |
Definition at line 497 of file camera.cpp.
| auto unravel::camera::viewport_to_world | ( | const math::vec2 & | point, |
| const math::plane & | plane, | ||
| math::vec3 & | position_out, | ||
| bool | clip ) const -> bool |
Converts a screen position into a world space position on the specified plane.
| point | The screen position. |
| plane | The plane to intersect. |
| position_out | The output world space position. |
| clip | Whether to clip the result. |
Definition at line 530 of file camera.cpp.
| auto unravel::camera::world_to_viewport | ( | const math::vec3 & | pos | ) | const -> math::vec3 |
Transforms a point from world space into screen space.
| pos | The world space position. |
Definition at line 473 of file camera.cpp.
| auto unravel::camera::x_unit_axis | ( | ) | const -> math::vec3 |
Retrieves the x-axis unit vector of the camera's local coordinate system.
Definition at line 358 of file camera.cpp.
| auto unravel::camera::y_unit_axis | ( | ) | const -> math::vec3 |
Retrieves the y-axis unit vector of the camera's local coordinate system.
Definition at line 362 of file camera.cpp.
| auto unravel::camera::z_unit_axis | ( | ) | const -> math::vec3 |
Retrieves the z-axis unit vector of the camera's local coordinate system.
Definition at line 367 of file camera.cpp.
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |