Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::DielectricFresnel Class Referenceabstract

Dielectric-dielectric interface Fresnel effect. More...

#include <DielectricFresnel.h>

Inheritance diagram for ph::DielectricFresnel:
ph::FresnelEffect ph::ExactDielectricFresnel ph::SchlickApproxDielectricFresnel

Public Member Functions

 DielectricFresnel (real iorOuter, real iorInner)
 
math::Spectrum calcReflectance (real cosThetaIncident) const override=0
 
std::optional< math::Vector3RcalcRefractDir (const math::Vector3R &I, const math::Vector3R &N) const
 Calculates the normalized refraction direction.
 
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(), but is slightly more efficient as it returns the cosine of refraction direction only.
 
real getIorOuter () const
 
real getIorInner () const
 
- Public Member Functions inherited from ph::FresnelEffect
virtual ~FresnelEffect ()=default
 
math::Spectrum calcTransmittance (real cosThetaIncident) const
 

Protected Attributes

real m_iorOuter
 
real m_iorInner
 

Detailed Description

Dielectric-dielectric interface Fresnel effect.

Fresnel effect where both inner and outer sides are dielectric.

Constructor & Destructor Documentation

◆ DielectricFresnel()

ph::DielectricFresnel::DielectricFresnel ( real iorOuter,
real iorInner )

Member Function Documentation

◆ calcReflectance()

math::Spectrum ph::DielectricFresnel::calcReflectance ( real cosThetaIncident) const
overridepure virtual
Parameters
cosThetaIncidentCosine of the incident angle.
Returns
The reflectance of the interface on the specified angle.
Note
cosThetaIncident is signed, so inner and outer sides can be determined.

Implements ph::FresnelEffect.

Implemented in ph::ExactDielectricFresnel, and ph::SchlickApproxDielectricFresnel.

◆ calcRefractCos()

std::optional< real > ph::DielectricFresnel::calcRefractCos ( const math::Vector3R & I,
const math::Vector3R & N ) const

Calculates the cosine (signed) of refraction direction. This method is similar to calcRefractDir(), but is slightly more efficient as it returns the cosine of refraction direction only.

Parameters
IThe normalized incident direction. Pointing away from the interface.
NThe normalized normal. Pointing to the outer side of the interface.
Returns
The cosine of the angle between refraction direction and N. May be empty if refraction is not possible, e.g., due to TIR.

◆ calcRefractDir()

std::optional< math::Vector3R > ph::DielectricFresnel::calcRefractDir ( const math::Vector3R & I,
const math::Vector3R & N ) const

Calculates the normalized refraction direction.

Parameters
IThe normalized incident direction. Pointing away from the interface.
NThe normalized normal. Pointing to the outer side of the interface.
Returns
The normalized refraction direction. May be empty if refraction is not possible, e.g., due to TIR.

◆ getIorInner()

real ph::DielectricFresnel::getIorInner ( ) const
inline

◆ getIorOuter()

real ph::DielectricFresnel::getIorOuter ( ) const
inline

Member Data Documentation

◆ m_iorInner

real ph::DielectricFresnel::m_iorInner
protected

◆ m_iorOuter

real ph::DielectricFresnel::m_iorOuter
protected

The documentation for this class was generated from the following files: