diff options
author | Adrian Kummerlaender | 2021-05-17 00:15:33 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2021-05-17 00:15:33 +0200 |
commit | 4ec94c97879aafef15f7663135745e4ba61e62cf (patch) | |
tree | 322ae3f003892513f529842ff0b3fd100573b680 /tangle/sampler/sampler.h | |
download | LiterateLB-4ec94c97879aafef15f7663135745e4ba61e62cf.tar LiterateLB-4ec94c97879aafef15f7663135745e4ba61e62cf.tar.gz LiterateLB-4ec94c97879aafef15f7663135745e4ba61e62cf.tar.bz2 LiterateLB-4ec94c97879aafef15f7663135745e4ba61e62cf.tar.lz LiterateLB-4ec94c97879aafef15f7663135745e4ba61e62cf.tar.xz LiterateLB-4ec94c97879aafef15f7663135745e4ba61e62cf.tar.zst LiterateLB-4ec94c97879aafef15f7663135745e4ba61e62cf.zip |
Extract first public LiterateLB version
Diffstat (limited to 'tangle/sampler/sampler.h')
-rw-r--r-- | tangle/sampler/sampler.h | 32 |
1 files changed, 32 insertions, 0 deletions
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 <LLBM/base.h> + +class RenderWindow; +class VolumetricRenderConfig; + +class Sampler { +protected: +const std::string _name; + +DeviceTexture<float> _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; + +}; |