20 #ifndef ANTKEEPER_SCENE_RECTANGLE_LIGHT_HPP
21 #define ANTKEEPER_SCENE_RECTANGLE_LIGHT_HPP
57 m_luminous_flux = luminous_flux;
58 luminous_flux_updated();
68 m_luminance = luminance;
81 return m_luminous_flux;
87 return m_colored_luminous_flux;
99 return m_colored_luminance;
103 [[nodiscard]]
inline constexpr std::span<const math::fvec3, 4>
get_corners() const noexcept
109 void transformed()
override;
110 void color_updated()
override;
111 void area_updated() noexcept;
112 void luminous_flux_updated() noexcept;
113 void luminance_updated() noexcept;
117 float m_luminous_flux{};
Abstract base class for light objects.
constexpr const vector_type & get_scale() const noexcept
Returns the scale of the object.
void set_luminance(float luminance) noexcept
Sets the luminance of the light.
constexpr math::fvec2 get_size() const noexcept
Returns the dimensions of the light.
void set_size(const math::fvec2 &size)
Sets the size of the light.
constexpr const math::fvec3 & get_colored_luminance() const noexcept
Returns the color-modulated luminance of the light.
constexpr float get_luminance() const noexcept
Returns the luminance of the light.
rectangle_light()
Constructs a rectangular area light.
constexpr float get_luminous_flux() const noexcept
Returns the luminous flux of the light.
light_type get_light_type() const noexcept override
Returns light_type::rectangle.
constexpr const math::fvec3 & get_colored_luminous_flux() const noexcept
Returns the color-modulated luminous flux of the light.
void set_luminous_flux(float luminous_flux) noexcept
Sets the luminous flux of the light.
constexpr std::span< const math::fvec3, 4 > get_corners() const noexcept
Returns the world-space positions of the light corners.
@ rectangle
Rectangle light.