Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::SamplesNDStream Class Referencefinal

#include <SamplesNDStream.h>

Public Member Functions

 SamplesNDStream (const real *buffer, std::size_t numDims, std::size_t numSamples)
 
const real * readSample ()
 Read the next N-dimensional sample.
 
template<std::size_t N>
std::array< real, N > readSample ()
 Read the next N-dimensional sample.
 
SampleFlow readSampleAsFlow ()
 Read the next N-dimensional sample as flow, which has more flexible controls for sampling.
 
std::size_t numDims () const
 
std::size_t numSamples () const
 
template<std::size_t N>
std::array< real, N > get (std::size_t index) const
 
const real * operator[] (std::size_t index) const
 Get the i-th N-dimensional sample.
 

Constructor & Destructor Documentation

◆ SamplesNDStream()

ph::SamplesNDStream::SamplesNDStream ( const real * buffer,
std::size_t numDims,
std::size_t numSamples )
inline

Member Function Documentation

◆ get()

template<std::size_t N>
std::array< real, N > ph::SamplesNDStream::get ( std::size_t index) const
inline

◆ numDims()

std::size_t ph::SamplesNDStream::numDims ( ) const
inline

◆ numSamples()

std::size_t ph::SamplesNDStream::numSamples ( ) const
inline

◆ operator[]()

const real * ph::SamplesNDStream::operator[] ( std::size_t index) const
inline

Get the i-th N-dimensional sample.

Returns
Pointer to the sample values (with N elements).

◆ readSample() [1/2]

const real * ph::SamplesNDStream::readSample ( )
inline

Read the next N-dimensional sample.

Returns
Pointer to a N-dimensional sample.

◆ readSample() [2/2]

template<std::size_t N>
std::array< real, N > ph::SamplesNDStream::readSample ( )
inline

Read the next N-dimensional sample.

Template Parameters
NNumber of dimensions. Must be equal to the sample dimension of this stream.

◆ readSampleAsFlow()

SampleFlow ph::SamplesNDStream::readSampleAsFlow ( )
inline

Read the next N-dimensional sample as flow, which has more flexible controls for sampling.

Returns
The next N-dimensional sample in the form of flow.

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