Basic GUI
This commit is contained in:
@@ -5,6 +5,10 @@
|
||||
void BVH::addModel(PModel model, glm::mat4 transform)
|
||||
{
|
||||
model->boundingBox.transform(transform);
|
||||
for (auto& point : model->positions)
|
||||
{
|
||||
point = glm::vec3(transform * glm::vec4(point, 1));
|
||||
}
|
||||
models.push_back(std::move(model));
|
||||
}
|
||||
|
||||
@@ -13,6 +17,10 @@ void BVH::addModels(std::vector<PModel> _models, glm::mat4 transform)
|
||||
for (int i = 0; i < _models.size(); ++i)
|
||||
{
|
||||
_models[i]->boundingBox.transform(transform);
|
||||
for (auto& point : _models[i]->positions)
|
||||
{
|
||||
point = glm::vec3(transform * glm::vec4(point, 1));
|
||||
}
|
||||
models.push_back(std::move(_models[i]));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ void Scene::render(Camera cam, RenderParameter params)
|
||||
image.resize(params.width * params.height);
|
||||
accumulator.resize(params.width * params.height);
|
||||
worker = std::thread(
|
||||
[&]()
|
||||
[&, cam, params]()
|
||||
{
|
||||
for (int samp = 0; samp < params.numSamples; ++samp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user