Class CPUSampleGenerator

Synopsis

#include <Source/Falcor/Utils/SampleGenerators/CPUSampleGenerator.h>

class dlldecl CPUSampleGenerator : public std::enable_shared_from_this<CPUSampleGenerator>

Description

Two-dimensional sample pattern generator on the CPU.

Inheritance

Ancestors: std::enable_shared_from_this< CPUSampleGenerator >

Decsendents: StratifiedSamplePattern, DxSamplePattern, HaltonSamplePattern

Methods

CPUSampleGenerator
~CPUSampleGenerator
getSampleCountReturn the total number of samples in the sample pattern.
nextReturn the next two-dimensional sample.
resetReset the sample generator.

Source

Lines 34-56 in Source/Falcor/Utils/SampleGenerators/CPUSampleGenerator.h.

class dlldecl CPUSampleGenerator : public std::enable_shared_from_this<CPUSampleGenerator>
{
public:
    using SharedPtr = std::shared_ptr<CPUSampleGenerator>;
    virtual ~CPUSampleGenerator() = default;
    /** Return the total number of samples in the sample pattern.
    */
    virtual uint32_t getSampleCount() const = 0;
    /** Reset the sample generator.
        \param[in] startID Start at this sample ID in the sample pattern.
    */
    virtual void reset(uint32_t startID = 0) = 0;
    /** Return the next two-dimensional sample.
        \return Sample in the range [-0.5, 0.5) in each dimension.
    */
    virtual float2 next() = 0;
protected:
    CPUSampleGenerator() = default;
};





Add Discussion as Guest

Log in