Files
Seele/src/Engine/System/LightGather.cpp
T
2024-06-09 12:20:53 +02:00

15 lines
532 B
C++

#include "LightGather.h"
using namespace Seele;
using namespace Seele::System;
LightGather::LightGather(PScene scene) : SystemBase(scene), lightEnv(scene->getLightEnvironment()) {}
LightGather::~LightGather() {}
void LightGather::update() {
lightEnv->reset();
scene->view<Component::PointLight>([this](Component::PointLight& pointLight) { lightEnv->addPointLight(pointLight); });
scene->view<Component::DirectionalLight>([this](Component::DirectionalLight& dirLight) { lightEnv->addDirectionalLight(dirLight); });
}