Photon Engine 2.0.0-beta
A physically based renderer.
|
#include <SGHalton.h>
Public Member Functions | |
SGHalton (std::size_t numSamples, EHaltonPermutation permutation, EHaltonSequence sequence) | |
std::unique_ptr< SampleGenerator > | makeNewborn (std::size_t numSampleBatches) const override |
Make a new generator. | |
Public Member Functions inherited from ph::SampleGenerator | |
SampleGenerator (std::size_t numSampleBatches, std::size_t maxCachedBatches) | |
SampleGenerator (std::size_t numSampleBatches) | |
virtual | ~SampleGenerator ()=default |
virtual void | rebirth () |
Reset this generator to its initial state, reviving it from dead state. Calling this method starts a new life cycle–all existing sample stages and values are lost, and references to them are invalidated. New declarations can be made after, and new sample values can be generated. | |
void | genSplitted (std::size_t numSplits, std::vector< std::unique_ptr< SampleGenerator > > &out_sgs) const |
bool | prepareSampleBatch () |
Generates sample values for current sample batch. Advances all sample values in all stages to the next batch. Will potentially generate sample values for more than one batch at once (cached). | |
SamplesNDHandle | declareStageND (std::size_t numDims, std::size_t numSamples) |
Similar to declareStageND() , with default size hints. | |
SamplesNDHandle | declareStageND (std::size_t numDims, std::size_t numSamples, std::vector< std::size_t > dimSizeHints) |
Declares a N-dimensional sample stage. A sample stage contains information for how the samples will be used, number of samples, etc. These information can help the sample generator to produce sample values of better quality. This method can only be called before sample batches are generated (before any call to prepareSampleBatch() ). | |
SamplesNDStream | getSamplesND (const SamplesNDHandle &handle) const |
Gets generated N-dimensional sample values in a stage. This method can only be called after sample batches are generated (after any call to prepareSampleBatch() ). | |
std::size_t | numSampleBatches () const |
std::size_t | maxCachedBatches () const |
std::size_t | numRemainingBatches () const |
bool | hasMoreBatches () const |
ph::SGHalton::SGHalton | ( | std::size_t | numSamples, |
EHaltonPermutation | permutation, | ||
EHaltonSequence | sequence ) |
|
overridevirtual |
Make a new generator.
Implements ph::SampleGenerator.