|
MobileRT
1.0
A multi platform C++ CPU progressive Ray Tracer.
|
#include <Sampler.hpp>


Public Member Functions | |
| Sampler ()=default | |
| Sampler (::std::uint32_t width, ::std::uint32_t height, ::std::uint32_t samples) | |
| Sampler (const Sampler &sampler)=delete | |
| Sampler (Sampler &&sampler) noexcept=delete | |
| virtual | ~Sampler () |
| Sampler & | operator= (const Sampler &sampler)=delete |
| Sampler & | operator= (Sampler &&sampler) noexcept=delete |
| void | resetSampling () |
| void | stopSampling () |
| virtual float | getSample (::std::uint32_t sample)=0 |
| float | getSample () |
Public Attributes | |
| ::std::atomic<::std::uint32_t > | sample_ {} |
| const ::std::uint32_t | domainSize_ {::std::numeric_limits<::std::uint32_t>::max()} |
| ::std::uint32_t | samples_ {::std::numeric_limits<::std::uint32_t>::max()} |
Protected Member Functions | |
| template<const ::std::size_t S> | |
| float | getSampleFromArray (const ::std::array< float, S > &values) |
A class which abstracts a random number generator.
|
explicitdefault |
|
explicit |
|
delete |
|
deletenoexcept |
|
virtual |
The destructor.
|
pure virtual |
Calculates a new sample.
| sample | The index of the desired sample. |
Implemented in Components::Constant, Components::HaltonSeq, Components::StaticHaltonSeq, Components::Stratified, Components::PCG, Components::MersenneTwister, Components::StaticMersenneTwister, and Components::StaticPCG.
| float Sampler::getSample | ( | ) |
Calculates a new sample.

|
inlineprotected |
An auxiliary method that increments the sample counter and gets the current sample from an array received via parameters.
| S | The size of the array. |
| values | The array to read the current sample. |
| void Sampler::resetSampling | ( | ) |
Resets the sampling counter.
| void Sampler::stopSampling | ( | ) |
Stops the sampling process.
| const ::std::uint32_t MobileRT::Sampler::domainSize_ {::std::numeric_limits<::std::uint32_t>::max()} |
| ::std::atomic<::std::uint32_t> MobileRT::Sampler::sample_ {} |
| ::std::uint32_t MobileRT::Sampler::samples_ {::std::numeric_limits<::std::uint32_t>::max()} |