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

Output for BsdfEvalQuery. More...

#include <BsdfEvalQuery.h>

Public Member Functions

void setBsdf (const math::Spectrum &bsdf, bool inferMeasurability=true)
 
const math::SpectrumgetBsdf () const
 
bool isMeasurable () const
 Tells whether this evaluation has potential to contribute. All evaluated data should be usable if true is returned; otherwise, zero contribution is implied, and evaluated data is undefined. This method is also an efficient way to decide whether the BSDF has sane value (compared to manually testing its value).
 
void setMeasurability (bool measurability)
 Set measurability directly.
 
void setMeasurability (const math::Spectrum &reference)
 Set measurability based on a reference spectrum.
 
 operator bool () const
 Convenient method for isMeasurable().
 

Detailed Description

Output for BsdfEvalQuery.

Note
It is an error to get output data if isMeasurable() returns false.

Member Function Documentation

◆ getBsdf()

const math::Spectrum & ph::BsdfEvalOutput::getBsdf ( ) const
inline
Returns
Get the evaluated BSDF. Guaranteed to be finite.

◆ isMeasurable()

bool ph::BsdfEvalOutput::isMeasurable ( ) const
inline

Tells whether this evaluation has potential to contribute. All evaluated data should be usable if true is returned; otherwise, zero contribution is implied, and evaluated data is undefined. This method is also an efficient way to decide whether the BSDF has sane value (compared to manually testing its value).

Note
Measurability has nothing to do with whether the sampled value is 0 or not.

◆ operator bool()

ph::BsdfEvalOutput::operator bool ( ) const
inline

Convenient method for isMeasurable().

◆ setBsdf()

void ph::BsdfEvalOutput::setBsdf ( const math::Spectrum & bsdf,
bool inferMeasurability = true )
inline
Parameters
bsdfThe evaluated BSDF.
inferMeasurabilityWhether to determine measurability from the supplied data.

◆ setMeasurability() [1/2]

void ph::BsdfEvalOutput::setMeasurability ( bool measurability)
inline

Set measurability directly.

◆ setMeasurability() [2/2]

void ph::BsdfEvalOutput::setMeasurability ( const math::Spectrum & reference)
inline

Set measurability based on a reference spectrum.


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