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

26 lines
575 B
C++
Raw Normal View History

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