Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
SGStratified.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <Common/primitive_type.h>
6
7#include <cstddef>
8#include <vector>
9
10namespace ph
11{
12
13// TODO: >= 3-D sample is straightforward
14
16{
17public:
18 explicit SGStratified(std::size_t numSamples);
19
20 std::unique_ptr<SampleGenerator> makeNewborn(std::size_t numSampleBatches) const override;
21
22private:
23 void onRebirth() override;
24
25 void genSamples1D(
26 const SampleContext& context,
27 const SampleStage& stage,
28 SamplesND out_samples) override;
29
30 void genSamples2D(
31 const SampleContext& context,
32 const SampleStage& stage,
33 SamplesND out_samples) override;
34
35 void reviseSampleStage(SampleStageReviser reviser) override;
36
37 static std::vector<std::size_t> reviseDimSizeHints(
38 std::size_t numSamples,
39 const std::vector<std::size_t>& originalDimSizeHints);
40};
41
42}// end namespace ph
Definition SGStratified.h:16
SGStratified(std::size_t numSamples)
Definition SGStratified.cpp:16
std::unique_ptr< SampleGenerator > makeNewborn(std::size_t numSampleBatches) const override
Make a new generator.
Definition SGStratified.cpp:96
Definition SampleContext.h:9
Generates samples in [0, 1]. Generators of different types produces samples with different properties...
Definition SampleGenerator.h:35
std::size_t numSampleBatches() const
Definition SampleGenerator.h:143
Definition SampleStage.h:14
Definition SampleStageReviser.h:12
Definition SamplesND.h:16
The root for all renderer implementations.
Definition EEngineProject.h:6