Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
TConstant2D.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace ph::math
6{
7
8template<typename Value>
9class TConstant2D : public TMathFunction2D<Value>
10{
11public:
12 explicit TConstant2D(Value constantValue);
13
14 Value evaluate(Value x, Value y) const override;
15
16private:
17 Value m_constantValue;
18};
19
20template<typename Value>
21inline TConstant2D<Value>::TConstant2D(const Value constantValue)
22 : m_constantValue(constantValue)
23{}
24
25template<typename Value>
26inline Value TConstant2D<Value>::evaluate(const Value x, const Value y) const
27{
28 return m_constantValue;
29}
30
31}// end namespace ph::math
Definition TConstant2D.h:10
Value evaluate(Value x, Value y) const override
Definition TConstant2D.h:26
TConstant2D(Value constantValue)
Definition TConstant2D.h:21
Definition TMathFunction2D.h:8
Math functions and utilities.
Definition TransformInfo.h:10