Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
LightComponent.hpp
Go to the documentation of this file.
1#pragma once
2#include <glm/glm.hpp>
3#include "core/EngineAPI.hpp"
5
6
7namespace Engine {
8
13 enum class LightType {
17 Point = 1,
19 Spot = 2
20 };
21
26 // [ReflectClass]
31 // [ReflectField]
32 glm::vec3 color{ 1.0f, 1.0f, 1.0f };
34 // [ReflectField]
35 float intensity = 1.0f;
37 // [ReflectField]
38 float range = 10.0f;
39 };
40
41
42} // namespace Engine
43
44REGISTER_COMPONENT(Engine::LightComponent, "Rendering & Lights/Light");
45
46
47
#define REGISTER_COMPONENT(Type, MenuPath)
Definition ComponentReflection.hpp:156
#define ENGINE_API
Definition EngineAPI.hpp:10
Definition Application.hpp:16
LightType
Type of light source calculation.
Definition LightComponent.hpp:13
@ Point
Omnidirectional point light source.
Definition LightComponent.hpp:17
@ Spot
Cone-constrained spot light source.
Definition LightComponent.hpp:19
@ Directional
Global directional light (e.g., Sun).
Definition LightComponent.hpp:15
Component representing a light source in the scene.
Definition LightComponent.hpp:27
LightType type
Type classification of the light source.
Definition LightComponent.hpp:29
float range
Attenuation distance range for point and spot lights.
Definition LightComponent.hpp:38
glm::vec3 color
RGB light color vector.
Definition LightComponent.hpp:32
float intensity
Intensity multiplier for brightness.
Definition LightComponent.hpp:35