Output for BsdfEvalQuery
.
More...
#include <BsdfEvalQuery.h>
|
void | setBsdf (const math::Spectrum &bsdf, bool inferMeasurability=true) |
|
const math::Spectrum & | getBsdf () 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() .
|
|
Output for BsdfEvalQuery
.
- Note
- It is an error to get output data if
isMeasurable()
returns false
.
◆ getBsdf()
- 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 |
◆ setBsdf()
void ph::BsdfEvalOutput::setBsdf |
( |
const math::Spectrum & | bsdf, |
|
|
bool | inferMeasurability = true ) |
|
inline |
- Parameters
-
bsdf | The evaluated BSDF. |
inferMeasurability | Whether 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: