Add Framwork for Assignment 3
This commit is contained in:
parent
a2d7f5c414
commit
c864d2a42f
14 changed files with 50048 additions and 48111 deletions
37
Framework/include/random_sampler_wrapper.hpp
Normal file
37
Framework/include/random_sampler_wrapper.hpp
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
|
||||
#pragma once
|
||||
#include <random_sampler.hpp>
|
||||
|
||||
namespace embree {
|
||||
|
||||
// Wrapper class
|
||||
class RandomSamplerWrapper {
|
||||
public:
|
||||
RandomSampler sampler;
|
||||
|
||||
virtual void init(int id) {
|
||||
RandomSampler_init(sampler, id);
|
||||
}
|
||||
|
||||
virtual void init(int pixelID, int sampleID) {
|
||||
RandomSampler_init(sampler, pixelID, sampleID);
|
||||
}
|
||||
|
||||
virtual void init(int x, int y, int sampleID) {
|
||||
RandomSampler_init(sampler, x, y, sampleID);
|
||||
}
|
||||
|
||||
virtual float get1D() {
|
||||
return RandomSampler_get1D(sampler);
|
||||
}
|
||||
|
||||
virtual Vec2f get2D() {
|
||||
return RandomSampler_get2D(sampler);
|
||||
}
|
||||
|
||||
virtual Vec3fa get3D() {
|
||||
return RandomSampler_get3D(sampler);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue