Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
DielectricFresnel.h
Go to the documentation of this file.
1#pragma once
2
4#include "Math/TVector3.h"
5
6#include <optional>
7
8namespace ph
9{
10
16{
17public:
18 DielectricFresnel(real iorOuter, real iorInner);
19
20 math::Spectrum calcReflectance(real cosThetaIncident) const override = 0;
21
28 std::optional<math::Vector3R> calcRefractDir(
29 const math::Vector3R& I,
30 const math::Vector3R& N) const;
31
40 std::optional<real> calcRefractCos(
41 const math::Vector3R& I,
42 const math::Vector3R& N) const;
43
44 real getIorOuter() const;
45 real getIorInner() const;
46
47protected:
50};
51
53{
54 return m_iorOuter;
55}
56
58{
59 return m_iorInner;
60}
61
62}// end namespace ph
Dielectric-dielectric interface Fresnel effect.
Definition DielectricFresnel.h:16
real m_iorOuter
Definition DielectricFresnel.h:48
real getIorOuter() const
Definition DielectricFresnel.h:52
real m_iorInner
Definition DielectricFresnel.h:49
std::optional< real > calcRefractCos(const math::Vector3R &I, const math::Vector3R &N) const
Calculates the cosine (signed) of refraction direction. This method is similar to calcRefractDir(),...
Definition DielectricFresnel.cpp:44
real getIorInner() const
Definition DielectricFresnel.h:57
math::Spectrum calcReflectance(real cosThetaIncident) const override=0
std::optional< math::Vector3R > calcRefractDir(const math::Vector3R &I, const math::Vector3R &N) const
Calculates the normalized refraction direction.
Definition DielectricFresnel.cpp:18
DielectricFresnel(real iorOuter, real iorInner)
Definition DielectricFresnel.cpp:13
Modeling Fresnel effects that occur on interfaces.
Definition FresnelEffect.h:16
Definition TTristimulusSpectrum.h:11
The root for all renderer implementations.
Definition EEngineProject.h:6