2025-01-24 00:19:11 +01:00
|
|
|
#include "Scene.h"
|
|
|
|
|
|
2025-01-24 21:01:01 +01:00
|
|
|
Scene::Scene(glm::vec3 cameraPos, glm::vec3 cameraDirection) : cameraPos(cameraPos), cameraDirection(cameraDirection) {}
|
|
|
|
|
|
|
|
|
|
Scene::~Scene() {}
|
|
|
|
|
|
|
|
|
|
void Scene::render(int width, int height, int numSamples)
|
2025-01-24 18:21:34 +01:00
|
|
|
{
|
2025-01-24 21:01:01 +01:00
|
|
|
image.clear();
|
|
|
|
|
accumulator.clear();
|
|
|
|
|
image.resize(width * height * 3);
|
|
|
|
|
accumulator.resize(width * height * 3);
|
|
|
|
|
for (int samp = 0; samp < numSamples; ++samp)
|
|
|
|
|
{
|
|
|
|
|
for (int w = 0; w < width; ++w)
|
|
|
|
|
{
|
|
|
|
|
for (int h = 0; h < height; ++h)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-01-24 18:21:34 +01:00
|
|
|
}
|