Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
BinaryMixedImage.h
Go to the documentation of this file.
1#pragma once
2
3#include "Actor/Image/Image.h"
4
5#include <memory>
6#include <utility>
7
8namespace ph
9{
10
11class BinaryMixedImage : public Image
12{
13public:
15
16 std::shared_ptr<TTexture<Image::ArrayType>> genNumericTexture(
17 const CookingContext& ctx) override = 0;
18
19 std::shared_ptr<TTexture<math::Spectrum>> genColorTexture(
20 const CookingContext& ctx) override = 0;
21
22 void setImageA(const std::weak_ptr<Image>& imageA);
23 void setImageB(const std::weak_ptr<Image>& imageB);
24
25protected:
26 auto checkoutImages() const -> std::pair<std::shared_ptr<Image>, std::shared_ptr<Image>>;
27
28private:
29 std::weak_ptr<Image> m_imageA;
30 std::weak_ptr<Image> m_imageB;
31};
32
33// In-header Implementations:
34
35inline void BinaryMixedImage::setImageA(const std::weak_ptr<Image>& imageA)
36{
37 m_imageA = imageA;
38}
39
40inline void BinaryMixedImage::setImageB(const std::weak_ptr<Image>& imageB)
41{
42 m_imageB = imageB;
43}
44
45}// end namespace ph
Definition BinaryMixedImage.h:12
void setImageB(const std::weak_ptr< Image > &imageB)
Definition BinaryMixedImage.h:40
BinaryMixedImage()
Definition BinaryMixedImage.cpp:10
std::shared_ptr< TTexture< math::Spectrum > > genColorTexture(const CookingContext &ctx) override=0
void setImageA(const std::weak_ptr< Image > &imageA)
Definition BinaryMixedImage.h:35
auto checkoutImages() const -> std::pair< std::shared_ptr< Image >, std::shared_ptr< Image > >
Definition BinaryMixedImage.cpp:18
std::shared_ptr< TTexture< Image::ArrayType > > genNumericTexture(const CookingContext &ctx) override=0
Information about the world being cooked.
Definition CookingContext.h:24
Definition Image.h:21
The root for all renderer implementations.
Definition EEngineProject.h:6
Definition TAABB2D.h:96