Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
TLinearGradientTexture.h
Go to the documentation of this file.
1#pragma once
2
4#include "Math/TVector2.h"
5#include "Math/TVector3.h"
6
7#include <Common/primitive_type.h>
8
9#include <memory>
10
11namespace ph
12{
13
14template<typename OutputType>
15class TLinearGradientTexture : public TTexture<OutputType>
16{
17public:
19 real beginU,
20 const std::shared_ptr<TTexture<OutputType>>& beginTexture,
21 real endU,
22 const std::shared_ptr<TTexture<OutputType>>& endTexture);
23
25 const math::Vector2R& beginUV,
26 const std::shared_ptr<TTexture<OutputType>>& beginTexture,
27 const math::Vector2R& endUV,
28 const std::shared_ptr<TTexture<OutputType>>& endTexture);
29
31 const math::Vector3R& beginUVW,
32 const std::shared_ptr<TTexture<OutputType>>& beginTexture,
33 const math::Vector3R& endUVW,
34 const std::shared_ptr<TTexture<OutputType>>& endTexture);
35
36 void sample(const SampleLocation& sampleLocation, OutputType* out_value) const override;
37
38private:
39 math::Vector3R m_beginUVW;
40 std::shared_ptr<TTexture<OutputType>> m_beginTexture;
41 math::Vector3R m_endUVW;
42 std::shared_ptr<TTexture<OutputType>> m_endTexture;
43};
44
45}// end namespace ph
46
Definition SampleLocation.h:22
Definition TLinearGradientTexture.h:16
void sample(const SampleLocation &sampleLocation, OutputType *out_value) const override
Definition TLinearGradientTexture.ipp:59
TLinearGradientTexture(real beginU, const std::shared_ptr< TTexture< OutputType > > &beginTexture, real endU, const std::shared_ptr< TTexture< OutputType > > &endTexture)
Definition TLinearGradientTexture.ipp:12
Definition TTexture.h:12
The root for all renderer implementations.
Definition EEngineProject.h:6