#include <core/Sampler.h>
Inheritance diagram for Sampler:

Public Member Functions | |
| virtual void | nextSample (Vector2 &sample) |
| virtual void | nextSample (float &sample) |
| virtual void | reset () |
Traditional set sampling functions. | |
| virtual void | createSamples (Vector2 *samples, int num_samples, MTRand *rand, bool shuffle=false) const =0 |
| virtual void | createSamples (float *samples, int num_samples, MTRand *rand, bool shuffle=false) const =0 |
Static Public Member Functions | |
Static Helper functions | |
| static void | shuffle (Vector2 *samples, int num_samples, MTRand *rand) |
| static void | shuffle (float *samples, int num_samples, MTRand *rand) |
The Sampler interface is designed to allow both incremental samplers such as Halton sequences as well as traditional set samplers. To support incremental sampling within the renderer we will need to make samplers a part of the per thread context.
|
||||||||||||||||||||
|
Create a set of 2D samples with known size. Some samplers may require that num_samples be a perfect square.
Implemented in Jittered, MultiJittered, NRooks, and Random. |
|
||||||||||||||||||||
|
Create a set of 1D samples with known size. Some samplers may requires that num_samples be a perfect square.
Implemented in Jittered, MultiJittered, NRooks, and Random. |
|
|
Create the next 2D sample in the series.
|
|
|
Create the next 1D sample in the series.
|
|
|
Let the sampler know that you are finished with the current series and it should reset in preparation for the next. |
|
||||||||||||||||
|
Shuffle a set of 2D samples.
|
|
||||||||||||||||
|
Shuffle a set of 1D samples.
|
1.4.3