Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::skylight_component Class Reference

Class that contains sky light data. More...

#include <light_component.h>

Inheritance diagram for unravel::skylight_component:
unravel::component_crtp< skylight_component > unravel::basic_component

Public Types

enum class  sky_mode { standard , perez , skybox }
 Enumeration for sky modes. More...
 
- Public Types inherited from unravel::component_crtp< skylight_component >
using base
 

Public Member Functions

auto get_mode () const noexcept -> const sky_mode &
 Gets the current sky mode.
 
void set_mode (const sky_mode &mode)
 Sets the sky mode.
 
auto get_turbidity () const noexcept -> float
 Gets the current turbidity value.
 
void set_turbidity (float turbidity)
 Sets the turbidity value.
 
auto get_cubemap () const noexcept -> const asset_handle< gfx::texture > &
 
void set_cubemap (const asset_handle< gfx::texture > &cubemap)
 
- Public Member Functions inherited from unravel::basic_component
void touch ()
 Marks the component as 'touched'.
 

Additional Inherited Members

- Public Attributes inherited from unravel::basic_component
bool eto {}
 Disable empty type optimizations.
 
- Static Public Attributes inherited from unravel::component_crtp< skylight_component >
static constexpr bool in_place_delete
 Indicates if the component can be deleted in place.
 

Detailed Description

Class that contains sky light data.

Definition at line 82 of file light_component.h.

Member Enumeration Documentation

◆ sky_mode

Enumeration for sky modes.

Enumerator
standard 

Standard sky mode.

perez 

Perez sky mode.

skybox 

Skybox.

Definition at line 89 of file light_component.h.

Member Function Documentation

◆ get_cubemap()

auto unravel::skylight_component::get_cubemap ( ) const -> const asset_handle<gfx::texture>&
inlinenoexcept

Definition at line 123 of file light_component.h.

◆ get_mode()

auto unravel::skylight_component::get_mode ( ) const -> const sky_mode&
noexcept

Gets the current sky mode.

Returns
A constant reference to the current sky mode.

Definition at line 135 of file light_component.cpp.

◆ get_turbidity()

auto unravel::skylight_component::get_turbidity ( ) const -> float
noexcept

Gets the current turbidity value.

Returns
The current turbidity value.

Definition at line 144 of file light_component.cpp.

◆ set_cubemap()

void unravel::skylight_component::set_cubemap ( const asset_handle< gfx::texture > & cubemap)
inline

Definition at line 127 of file light_component.h.

◆ set_mode()

void unravel::skylight_component::set_mode ( const sky_mode & mode)

Sets the sky mode.

Parameters
[in]modeThe sky mode to set.

Definition at line 139 of file light_component.cpp.

◆ set_turbidity()

void unravel::skylight_component::set_turbidity ( float turbidity)

Sets the turbidity value.

Parameters
[in]turbidityThe turbidity value to set, in the range 1.9f-10.0f.

Definition at line 149 of file light_component.cpp.


The documentation for this class was generated from the following files: