MOS
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mos::gfx::Spot_light Class Referencefinal

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 &center=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...
 

Detailed Description

Spotlight.

Member Function Documentation

◆ angle()

auto mos::gfx::Spot_light::angle ( float  angle) -> void

Set spot angle, in radans.

◆ blend()

auto mos::gfx::Spot_light::blend ( float  blend) -> void

Set blend factor.

◆ direction()

auto mos::gfx::Spot_light::direction ( const glm::vec3 &  direction) -> void

Set center/focus point.

◆ near_far()

auto mos::gfx::Spot_light::near_far ( float  near,
float  far 
) -> void

Set near and far plane.

◆ position()

auto mos::gfx::Spot_light::position ( const glm::vec3 &  position) -> void

Set position.

Member Data Documentation

◆ camera

Camera mos::gfx::Spot_light::camera

Camera for shadow map rendering.

◆ strength

float mos::gfx::Spot_light::strength

Strength of the lamp in watts.


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