From 4ec94c97879aafef15f7663135745e4ba61e62cf Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Mon, 17 May 2021 00:15:33 +0200 Subject: Extract first public LiterateLB version --- tangle/sampler/sampler.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tangle/sampler/sampler.h (limited to 'tangle/sampler/sampler.h') diff --git a/tangle/sampler/sampler.h b/tangle/sampler/sampler.h new file mode 100644 index 0000000..ccc50b1 --- /dev/null +++ b/tangle/sampler/sampler.h @@ -0,0 +1,32 @@ +#pragma once + +#include + +class RenderWindow; +class VolumetricRenderConfig; + +class Sampler { +protected: +const std::string _name; + +DeviceTexture _sample_buffer; +cudaTextureObject_t _sample_texture; +cudaSurfaceObject_t _sample_surface; + +public: +Sampler(std::string name, descriptor::CuboidD<3> cuboid): + _name(name), + _sample_buffer(cuboid), + _sample_texture(_sample_buffer.getTexture()), + _sample_surface(_sample_buffer.getSurface()) + { } + +const std::string& getName() const { + return _name; +} + +virtual void sample() = 0; +virtual void render(VolumetricRenderConfig& config) = 0; +virtual void interact() = 0; + +}; -- cgit v1.2.3