Unravel Engine C++ Reference
|
Class that contains core reflection probe data, used for rendering and other purposes. More...
#include <reflection_probe_component.h>
Public Member Functions | |
auto | get_probe () const -> const reflection_probe & |
Gets the reflection probe object. | |
void | set_probe (const reflection_probe &probe) |
Sets the reflection probe object. | |
auto | get_bounds () const -> math::bbox |
Gets the bounding box of the probe object. | |
auto | compute_projected_sphere_rect (irect32_t &rect, const math::vec3 &position, const math::vec3 &scale, const math::vec3 &view_origin, const math::transform &view, const math::transform &proj) const -> int |
Computes the projected sphere rectangle. | |
auto | get_render_view (size_t idx) -> gfx::render_view & |
Gets the render view. | |
auto | get_cubemap_prefiltered () -> const gfx::texture::ptr & |
Gets the cubemap texture. | |
auto | get_cubemap () -> const gfx::texture::ptr & |
auto | get_cubemap_fbo (size_t face) -> const gfx::frame_buffer::ptr & |
Gets the cubemap frame buffer object (FBO). | |
void | update () |
Updates the reflection probe component. | |
auto | already_generated () const -> bool |
Check if the cubemap was generated this frame. | |
auto | already_generated (size_t face) const -> bool |
Check if the cubemap's face was generated this frame. | |
void | set_generation_frame (size_t face, uint64_t frame) |
marks the genrerated face this frame | |
auto | get_faces_per_frame () const -> size_t |
Gets the number of faces generated per frame. | |
void | set_faces_per_frame (size_t faces) |
Sets the number of faces generated per frame. | |
auto | get_apply_prefilter () const -> bool |
Gets whether prefiltering is applied. | |
void | set_apply_prefilter (bool apply) |
Sets whether to apply prefiltering. | |
![]() | |
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 reflection probe data, used for rendering and other purposes.
Definition at line 18 of file reflection_probe_component.h.
auto unravel::reflection_probe_component::already_generated | ( | ) | const -> bool |
Check if the cubemap was generated this frame.
Definition at line 179 of file reflection_probe_component.cpp.
auto unravel::reflection_probe_component::already_generated | ( | size_t | face | ) | const -> bool |
Check if the cubemap's face was generated this frame.
Definition at line 190 of file reflection_probe_component.cpp.
auto unravel::reflection_probe_component::compute_projected_sphere_rect | ( | irect32_t & | rect, |
const math::vec3 & | position, | ||
const math::vec3 & | scale, | ||
const math::vec3 & | view_origin, | ||
const math::transform & | view, | ||
const math::transform & | proj ) const -> int |
Computes the projected sphere rectangle.
[out] | rect | Reference to the rectangle to be computed. |
[in] | position | The position of the reflection probe. |
[in] | view_origin | The origin of the view. |
[in] | view | The view transform. |
[in] | proj | The projection transform. |
Definition at line 26 of file reflection_probe_component.cpp.
|
inline |
Gets whether prefiltering is applied.
Definition at line 113 of file reflection_probe_component.h.
auto unravel::reflection_probe_component::get_bounds | ( | ) | const -> math::bbox |
Gets the bounding box of the probe object.
Definition at line 6 of file reflection_probe_component.cpp.
auto unravel::reflection_probe_component::get_cubemap | ( | ) | -> const gfx::texture::ptr& |
Definition at line 74 of file reflection_probe_component.cpp.
auto unravel::reflection_probe_component::get_cubemap_fbo | ( | size_t | face | ) | -> const gfx::frame_buffer::ptr& |
Gets the cubemap frame buffer object (FBO).
Definition at line 106 of file reflection_probe_component.cpp.
auto unravel::reflection_probe_component::get_cubemap_prefiltered | ( | ) | -> const gfx::texture::ptr& |
Gets the cubemap texture.
Definition at line 90 of file reflection_probe_component.cpp.
|
inline |
Gets the number of faces generated per frame.
Definition at line 101 of file reflection_probe_component.h.
auto unravel::reflection_probe_component::get_probe | ( | ) | const -> const reflection_probe& |
Gets the reflection probe object.
Definition at line 162 of file reflection_probe_component.cpp.
auto unravel::reflection_probe_component::get_render_view | ( | size_t | idx | ) | -> gfx::render_view& |
Gets the render view.
[in] | idx | The index of the render view to get. |
Definition at line 69 of file reflection_probe_component.cpp.
|
inline |
Sets whether to apply prefiltering.
apply | True to apply prefiltering, false otherwise. |
Definition at line 119 of file reflection_probe_component.h.
|
inline |
Sets the number of faces generated per frame.
faces | The number of faces to generate per frame. |
Definition at line 107 of file reflection_probe_component.h.
void unravel::reflection_probe_component::set_generation_frame | ( | size_t | face, |
uint64_t | frame ) |
marks the genrerated face this frame
Definition at line 203 of file reflection_probe_component.cpp.
void unravel::reflection_probe_component::set_probe | ( | const reflection_probe & | probe | ) |
Sets the reflection probe object.
[in] | probe | The reflection probe object to set. |
Definition at line 167 of file reflection_probe_component.cpp.
void unravel::reflection_probe_component::update | ( | ) |
Updates the reflection probe component.
Definition at line 136 of file reflection_probe_component.cpp.