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
3
#include "
Core/SampleGenerator/SampleGenerator.h
"
4
5
#include <Common/primitive_type.h>
6
7
#include <cstddef>
8
#include <vector>
9
10
namespace
ph
11
{
12
13
// TODO: >= 3-D sample is straightforward
14
15
class
SGStratified
:
public
SampleGenerator
16
{
17
public
:
18
explicit
SGStratified
(std::size_t numSamples);
19
20
std::unique_ptr<SampleGenerator>
makeNewborn
(std::size_t
numSampleBatches
)
const override
;
21
22
private
:
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
SampleGenerator.h
ph::SGStratified
Definition
SGStratified.h:16
ph::SGStratified::SGStratified
SGStratified(std::size_t numSamples)
Definition
SGStratified.cpp:16
ph::SGStratified::makeNewborn
std::unique_ptr< SampleGenerator > makeNewborn(std::size_t numSampleBatches) const override
Make a new generator.
Definition
SGStratified.cpp:96
ph::SampleContext
Definition
SampleContext.h:9
ph::SampleGenerator
Generates samples in [0, 1]. Generators of different types produces samples with different properties...
Definition
SampleGenerator.h:35
ph::SampleGenerator::numSampleBatches
std::size_t numSampleBatches() const
Definition
SampleGenerator.h:143
ph::SampleStage
Definition
SampleStage.h:14
ph::SampleStageReviser
Definition
SampleStageReviser.h:12
ph::SamplesND
Definition
SamplesND.h:16
ph
The root for all renderer implementations.
Definition
EEngineProject.h:6
Source
Core
SampleGenerator
SGStratified.h
Generated by
1.11.0