Sampler class
#include <darts/sampler.h>
Abstract sample generator.
A sample generator is responsible for generating the random number stream that will be passed to an #Integrator implementation as it computes the radiance incident along a specified ray.
Derived classes
- class Independent
- Independent sampling - returns independent uniformly distributed random numbers on .
Public functions
- auto clone() const -> std::unique_ptr<Sampler> pure virtual
- Create an exact copy of this Sampler instance.
- void seed(int seedx, int seedy) virtual
- Deterministically seed the underlying RNG (to produce identical results between runs)
- void start_pixel(int x, int y) pure virtual
- Prepare to generate samples for pixel (x,y).
- void advance() virtual
- Advance to the next sample.
- auto next1f() -> float pure virtual
- Retrieve the next float value (dimension) from the current sample.
- auto next2f() -> Vec2f pure virtual
- Retrieve the next two float values (dimensions) from the current sample.
- auto sample_count() const -> uint32_t virtual
- Return the number of configured pixel samples.
Function documentation
void Sampler:: start_pixel(int x,
int y) pure virtual
Prepare to generate samples for pixel (x,y).
This function is called every time the integrator starts rendering a new pixel.