184 const glm::vec3 &color = glm::vec3(1.0f));
193 static std::shared_ptr<Light>
create_point(
const glm::vec3 &position,
float range = 10.0f,
194 const glm::vec3 &color = glm::vec3(1.0f));
204 static std::shared_ptr<Light>
create_spot(
const glm::vec3 &position,
const glm::vec3 &direction,
205 float angle = 45.0f,
const glm::vec3 &color = glm::vec3(1.0f));
void set_intensity(float intensity)
Sets the intensity of the light.
Definition light.hpp:89
float get_intensity() const
Gets the intensity of the light.
Definition light.hpp:82
static std::shared_ptr< Light > create_spot(const glm::vec3 &position, const glm::vec3 &direction, float angle=45.0f, const glm::vec3 &color=glm::vec3(1.0f))
Creates a spotlight.
Definition light.cpp:24
void set_position(const glm::vec3 &position)
Sets the position of the light.
Definition light.hpp:117
float get_range() const
Gets the range of the light.
Definition light.hpp:124
void set_inner_cone(float inner_cone)
Sets the inner cone angle of the spotlight.
Definition light.hpp:145
LightType get_type() const
Gets the type of the light.
Definition light.hpp:61
float m_inner_cone
The inner cone angle of the spotlight in radians.
Definition light.hpp:227
float m_intensity
The intensity of the light.
Definition light.hpp:215
virtual ~Light()=default
Virtual destructor for the Light class.
void set_direction(const glm::vec3 &direction)
Sets the direction of the light.
Definition light.hpp:103
const glm::vec3 & get_color() const
Sets the type of the light.
Definition light.hpp:68
Light(LightType type=LightType::Point)
Constructs a Light object with the specified type.
Definition light.cpp:7
glm::vec3 m_color
The color of the light.
Definition light.hpp:212
float get_inner_cone() const
Gets the inner cone angle of the spotlight.
Definition light.hpp:138
void set_range(float range)
Sets the range of the light.
Definition light.hpp:131
void set_outer_cone(float outer_cone)
Sets the outer cone angle of the spotlight.
Definition light.hpp:159
static std::shared_ptr< Light > create_point(const glm::vec3 &position, float range=10.0f, const glm::vec3 &color=glm::vec3(1.0f))
Creates a point light.
Definition light.cpp:16
LightType m_type
The type of the light.
Definition light.hpp:209
glm::vec3 m_direction
The direction of the light.
Definition light.hpp:218
float m_range
The range of the light.
Definition light.hpp:224
glm::vec3 m_position
The position of the light.
Definition light.hpp:221
const glm::vec3 & get_direction() const
Gets the direction of the light.
Definition light.hpp:96
const glm::vec3 & get_position() const
Gets the position of the light.
Definition light.hpp:110
bool casts_shadows() const
Checks if the light casts shadows.
Definition light.hpp:166
void set_casts_shadows(bool casts_shadows)
Sets whether the light casts shadows.
Definition light.hpp:173
static std::shared_ptr< Light > create_directional(const glm::vec3 &direction, const glm::vec3 &color=glm::vec3(1.0f))
Creates a directional light.
Definition light.cpp:9
float m_outer_cone
The outer cone angle of the spotlight in radians.
Definition light.hpp:230
void set_color(const glm::vec3 &color)
Sets the color of the light.
Definition light.hpp:75
bool m_casts_shadows
Flag indicating whether the light casts shadows.
Definition light.hpp:233
float get_outer_cone() const
Gets the outer cone angle of the spotlight.
Definition light.hpp:152
Namespace for scene-related classes and functions.
Definition camera.cpp:7
LightType
Enumeration of different light types.
Definition light.hpp:28
@ Point
Point light source.
Definition light.hpp:30
@ Spot
Spotlight source.
Definition light.hpp:31
@ Directional
Directional light source.
Definition light.hpp:29
Forward declarations for Assimp Material structure.
Definition model_loader.cpp:12