From e657cd65bccc0c60f5666386409a5f4ae02df626 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 20 Jun 2021 11:52:06 +0200 Subject: Improve camera, volumetric example sections --- tangle/util/volumetric_example.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'tangle/util/volumetric_example.h') 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 - #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 class SAMPLER, typename... ARGS> void add(ARGS&&... args) { _sampler.emplace_back(new SAMPLER(std::forward(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); +} + }; -- cgit v1.2.3