MOS
|
Spotlight. More...
#include <spot_light.hpp>
Public Member Functions | |
Spot_light (const glm::vec3 &position=glm::vec3(0.0f, 0.0f, 2.0f), const glm::vec3 ¢er=glm::vec3(0.0f, 0.0f, 0.0f), float angle=glm::half_pi< float >(), const glm::vec3 &color=glm::vec3(0.0f), float strength=0.0f, float near=0.1f, float far=10.0f, float blend=0.15) | |
auto | blend (float blend) -> void |
Set blend factor. More... | |
auto | blend () const -> float |
auto | angle (float angle) -> void |
Set spot angle, in radans. More... | |
auto | angle () const -> float |
auto | position (const glm::vec3 &position) -> void |
Set position. More... | |
auto | position () const -> glm::vec3 |
auto | direction (const glm::vec3 &direction) -> void |
Set center/focus point. More... | |
auto | direction () const -> glm::vec3 |
auto | near_far (float near, float far) -> void |
Set near and far plane. More... | |
Static Public Member Functions | |
static auto | load (const std::string &directory, const std::string &path, const glm::mat4 &parent_transform=glm::mat4(1.0f)) -> Spot_light |
Public Attributes | |
glm::vec3 | color = glm::vec3(0.0f) |
float | strength |
Strength of the lamp in watts. More... | |
Camera | camera |
Camera for shadow map rendering. More... | |
Spotlight.
auto mos::gfx::Spot_light::angle | ( | float | angle | ) | -> void |
Set spot angle, in radans.
auto mos::gfx::Spot_light::blend | ( | float | blend | ) | -> void |
Set blend factor.
auto mos::gfx::Spot_light::direction | ( | const glm::vec3 & | direction | ) | -> void |
Set center/focus point.
auto mos::gfx::Spot_light::near_far | ( | float | near, |
float | far | ||
) | -> void |
Set near and far plane.
auto mos::gfx::Spot_light::position | ( | const glm::vec3 & | position | ) | -> void |
Set position.
float mos::gfx::Spot_light::strength |
Strength of the lamp in watts.