summaryrefslogtreecommitdiff
path: root/tangle/util/volumetric_example.h
diff options
context:
space:
mode:
authorAdrian Kummerlaender2021-06-20 11:52:06 +0200
committerAdrian Kummerlaender2021-06-20 11:52:06 +0200
commite657cd65bccc0c60f5666386409a5f4ae02df626 (patch)
tree8355a7f2ebd6fecfdc8b5338bb9716d9d215bca6 /tangle/util/volumetric_example.h
parent0f0a35339723e5dc67d2e519f606e5854cfb9e96 (diff)
downloadLiterateLB-e657cd65bccc0c60f5666386409a5f4ae02df626.tar
LiterateLB-e657cd65bccc0c60f5666386409a5f4ae02df626.tar.gz
LiterateLB-e657cd65bccc0c60f5666386409a5f4ae02df626.tar.bz2
LiterateLB-e657cd65bccc0c60f5666386409a5f4ae02df626.tar.lz
LiterateLB-e657cd65bccc0c60f5666386409a5f4ae02df626.tar.xz
LiterateLB-e657cd65bccc0c60f5666386409a5f4ae02df626.tar.zst
LiterateLB-e657cd65bccc0c60f5666386409a5f4ae02df626.zip
Improve camera, volumetric example sections
Diffstat (limited to 'tangle/util/volumetric_example.h')
-rw-r--r--tangle/util/volumetric_example.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/tangle/util/volumetric_example.h b/tangle/util/volumetric_example.h
index cbcb2d2..3310655 100644
--- a/tangle/util/volumetric_example.h
+++ b/tangle/util/volumetric_example.h
@@ -1,6 +1,5 @@
#pragma once
#include <LLBM/volumetric.h>
-
#include "camera.h"
#include "texture.h"
#include "colormap.h"
@@ -22,17 +21,6 @@ int _steps_per_second = 100;
int _samples_per_second = 30;
public:
-VolumetricExample(descriptor::CuboidD<3> cuboid):
- RenderWindow("LiterateLB"),
- _camera(make_float3(cuboid.nX/2,cuboid.nY/2,cuboid.nZ/2), cuboid.nX),
- _config(cuboid),
- _palette(_config.palette),
- _noise(_config.noise)
-{
- _config.canvas = this->getRenderSurface();
- this->setBlur(_config.apply_blur);
-}
-
template <template<typename...> class SAMPLER, typename... ARGS>
void add(ARGS&&... args) {
_sampler.emplace_back(new SAMPLER(std::forward<ARGS>(args)...));
@@ -120,4 +108,15 @@ void run(TIMESTEP step) {
simulation.wait();
}
+VolumetricExample(descriptor::CuboidD<3> cuboid):
+ RenderWindow("LiterateLB"),
+ _camera(make_float3(cuboid.nX/2,cuboid.nY/2,cuboid.nZ/2), cuboid.nX),
+ _config(cuboid),
+ _palette(_config.palette),
+ _noise(_config.noise)
+{
+ _config.canvas = this->getRenderSurface();
+ this->setBlur(_config.apply_blur);
+}
+
};