#include "HydraSpotLightActor.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/HydraLightComponent.h" #include "../ecs/components/HydraSpotShadowSourceComponent.h" #include "../buffer/HydraLightBufferManager.h" #include "../buffer/HydraLightBuffer.h" void HydraSpotLightActor::InitialiseComponents() { HydraLightComponent light_comp = {}; HydraECS *ecs = GetEngine()->ECS(); light_comp.diffuse = glm::vec4(1,1,1,1); light_comp.intensity = 10000.0f; light_comp.light_type = static_cast(HYDRA_LIGHT_TYPE::HYDRA_LIGHT_SPOT); light_comp.cutoff = glm::cos(glm::radians(10.0f)); light_comp.cutoff_outer = glm::cos(glm::radians(25.0f)); light_comp.entity_id = GetID(); ecs->AddComponent(GetID(), light_comp); HydraPositionComponent position_component; ecs->AddComponent(GetID(), position_component); HydraSpotShadowSourceComponent shadow_component = {}; ecs->AddComponent(GetID(), shadow_component); } void HydraSpotLightActor::Destroy() { }