Files
HydraV3/HydraEngine/source/actor/HydraPointLightActor.cpp
T
2026-08-18 16:23:20 +01:00

35 lines
1.2 KiB
C++

#include "HydraPointLightActor.h"
#include "../engine/HydraEngine.h"
#include "../actor/HydraActorManager.h"
#include "../task/HydraTask.h"
#include "../ecs/HydraECS.h"
#include "../ecs/components/HydraPositionComponent.h"
#include "../ecs/components/HydraMeshComponent.h"
#include "../ecs/components/HydraRenderableComponent.h"
#include "../ecs/components/HydraMaterialComponent.h"
#include "../ecs/components/HydraPointShadowSourceComponent.h"
#include "../ecs/components/HydraLightComponent.h"
#include "../buffer/HydraLightBufferManager.h"
void HydraPointLightActor::InitialiseComponents()
{
HydraLightComponent light_comp = {};
HydraECS *ecs = GetEngine()->ECS();
light_comp.diffuse = glm::vec4(1,1,1,1);
light_comp.intensity = 1000.0f;
light_comp.light_type = static_cast<uint32_t>(HYDRA_LIGHT_TYPE::HYDRA_LIGHT_POINT);
light_comp.entity_id = GetID();
ecs->AddComponent<HydraLightComponent>(GetID(), light_comp);
HydraPositionComponent position_component;
ecs->AddComponent<HydraPositionComponent>(GetID(), position_component);
HydraPointShadowSourceComponent shadow_component = {};
ecs->AddComponent<HydraPointShadowSourceComponent>(GetID(), shadow_component);
}