Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
SamplesNDHandle.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <Common/assertion.h>
6
7#include <cstddef>
8#include <utility>
9
10namespace ph
11{
12
13class SamplesNDHandle final
14{
15 friend class SampleGenerator;
16
17protected:
18 SamplesNDHandle(std::size_t stageIndex, std::size_t numDims);
19
20 std::size_t getStageIndex() const;
21 std::size_t numDims() const;
22
23private:
24 std::size_t m_stageIndex;
25 std::size_t m_numDims;
26};
27
28// In-header Implementations:
29
30inline SamplesNDHandle::SamplesNDHandle(const std::size_t stageIndex, const std::size_t numDims) :
31 m_stageIndex(stageIndex), m_numDims(numDims)
32{
33 PH_ASSERT_GT(m_numDims, 0);
34}
35
36inline std::size_t SamplesNDHandle::getStageIndex() const
37{
38 return m_stageIndex;
39}
40
41inline std::size_t SamplesNDHandle::numDims() const
42{
43 return m_numDims;
44}
45
46}// end namespace ph
Generates samples in [0, 1]. Generators of different types produces samples with different properties...
Definition SampleGenerator.h:35
Definition SamplesNDHandle.h:14
SamplesNDHandle(std::size_t stageIndex, std::size_t numDims)
Definition SamplesNDHandle.h:30
std::size_t numDims() const
Definition SamplesNDHandle.h:41
std::size_t getStageIndex() const
Definition SamplesNDHandle.h:36
The root for all renderer implementations.
Definition EEngineProject.h:6