MobileRT  1.0
A multi platform C++ CPU progressive Ray Tracer.
Components::Constant Class Referencefinal

#include <Constant.hpp>

Inheritance diagram for Components::Constant:
Inheritance graph
Collaboration diagram for Components::Constant:
Collaboration graph

Public Member Functions

 Constant ()=delete
 
 Constant (float value)
 
 Constant (const Constant &constant)=delete
 
 Constant (Constant &&constant) noexcept=delete
 
 ~Constant () final=default
 
Constantoperator= (const Constant &constant)=delete
 
Constantoperator= (Constant &&constant) noexcept=delete
 
float getSample (::std::uint32_t sample) final
 
- Public Member Functions inherited from MobileRT::Sampler
 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 ()
 
Sampleroperator= (const Sampler &sampler)=delete
 
Sampleroperator= (Sampler &&sampler) noexcept=delete
 
void resetSampling ()
 
void stopSampling ()
 
float getSample ()
 

Private Attributes

const float value_ {}
 

Additional Inherited Members

- Public Attributes inherited from MobileRT::Sampler
::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 inherited from MobileRT::Sampler
template<const ::std::size_t S>
float getSampleFromArray (const ::std::array< float, S > &values)
 

Detailed Description

This sampler always returns the same value.

Constructor & Destructor Documentation

◆ Constant() [1/4]

Components::Constant::Constant ( )
explicitdelete

◆ Constant() [2/4]

Components::Constant::Constant ( float  value)
explicit

◆ Constant() [3/4]

Components::Constant::Constant ( const Constant constant)
delete

◆ Constant() [4/4]

Components::Constant::Constant ( Constant &&  constant)
deletenoexcept

◆ ~Constant()

Components::Constant::~Constant ( )
finaldefault

Member Function Documentation

◆ getSample()

float Constant::getSample ( ::std::uint32_t  sample)
finalvirtual

Calculates a new sample.

Parameters
sampleThe index of the desired sample.
Returns
A random value between 0 and 1.

Implements MobileRT::Sampler.

◆ operator=() [1/2]

Constant& Components::Constant::operator= ( const Constant constant)
delete

◆ operator=() [2/2]

Constant& Components::Constant::operator= ( Constant &&  constant)
deletenoexcept

Member Data Documentation

◆ value_

const float Components::Constant::value_ {}
private

The documentation for this class was generated from the following files: