19 #include <nori/sampler.h>
20 #include <nori/block.h>
36 m_sampleCount = (size_t) propList.
getInteger(
"sampleCount", 1);
41 std::unique_ptr<Sampler>
clone()
const {
42 std::unique_ptr<Independent> cloned(
new Independent());
43 cloned->m_sampleCount = m_sampleCount;
44 cloned->m_random = m_random;
45 return std::move(cloned);
59 return m_random.nextFloat();
69 virtual std::string
toString()
const override {
70 return tfm::format(
"Independent[sampleCount=%i]", m_sampleCount);
Weighted pixel storage for a rectangular subregion of an image.
const Point2i & getOffset() const
Return the offset of the block within the main image.
void prepare(const ImageBlock &block)
Prepare to render a new image block.
virtual std::string toString() const override
Return a brief string summary of the instance (for debugging purposes)
std::unique_ptr< Sampler > clone() const
Create an exact clone of the current instance.
Point2f next2D()
Retrieve the next two component values from the current sample.
void generate()
Prepare to generate new samples.
float next1D()
Retrieve the next component value from the current sample.
void advance()
Advance to the next sample.
This is an associative container used to supply the constructors of NoriObject subclasses with parame...
int getInteger(const std::string &name) const
Get an integer property, and throw an exception if it does not exist.
Abstract sample generator.