Files
Seele/src/Engine/System/LightGather.cpp
T

19 lines
702 B
C++
Raw Normal View History

2023-10-26 18:37:29 +02:00
#include "LightGather.h"
using namespace Seele;
using namespace Seele::System;
2024-06-09 12:20:04 +02:00
LightGather::LightGather(PScene scene) : SystemBase(scene), lightEnv(scene->getLightEnvironment()) {}
2023-10-26 18:37:29 +02:00
2024-06-09 12:20:04 +02:00
LightGather::~LightGather() {}
2023-10-26 18:37:29 +02:00
2024-06-09 12:20:04 +02:00
void LightGather::update() {
2023-11-30 11:51:53 +01:00
lightEnv->reset();
2025-05-07 16:08:12 +02:00
scene->view<Component::PointLight, Component::Transform>(
[this](Component::PointLight& pointLight, Component::Transform& transform) { lightEnv->addPointLight(pointLight, transform); });
scene->view<Component::DirectionalLight, Component::Transform>(
[this](Component::DirectionalLight& dirLight, Component::Transform& transform) {
lightEnv->addDirectionalLight(dirLight, transform);
});
2023-10-26 18:37:29 +02:00
}