aboutsummaryrefslogtreecommitdiff
path: root/src/sampling/sampler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sampling/sampler.cpp')
-rw-r--r--src/sampling/sampler.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sampling/sampler.cpp b/src/sampling/sampler.cpp
new file mode 100644
index 0000000..d960816
--- /dev/null
+++ b/src/sampling/sampler.cpp
@@ -0,0 +1,10 @@
+#include "sampler.hpp"
+
+void Sampler::startPixel(const Vec2d &p) {
+ m_curPixel = p;
+ m_curPixelSampleIndex = 0;
+}
+
+bool Sampler::startNextSample() {
+ return ++m_curPixelSampleIndex < m_sampleCount;
+}