Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::lta::PDF Class Referencefinal

A sample from a Probability Density Function (PDF). More...

#include <PDF.h>

Public Member Functions

real getPdfW () const
 
real getPdfA () const
 
real getPdfD () const
 
bool isEmpty () const
 
real operator* () const
 
 operator bool () const
 Whether the PDF is sane and positive.
 
PDF operator+ (real rhs) const
 Perform arithmetic on value without changing its domain.
 
PDF operator- (real rhs) const
 
PDF operator* (real rhs) const
 
PDF operator/ (real rhs) const
 

Static Public Member Functions

static PDF W (real pdfW)
 
static PDF A (real pdfA)
 
static PDF D (real pdfD)
 

Public Attributes

real value = 0.0_r
 
EDomain domain = EDomain::Empty
 

Detailed Description

A sample from a Probability Density Function (PDF).

Member Function Documentation

◆ A()

PDF ph::lta::PDF::A ( real pdfA)
inlinestatic
Returns
Area domain PDF with value == pdfA.

◆ D()

PDF ph::lta::PDF::D ( real pdfD)
inlinestatic
Returns
Discrete domain PDF with value == pdfD.

◆ getPdfA()

real ph::lta::PDF::getPdfA ( ) const
inline

◆ getPdfD()

real ph::lta::PDF::getPdfD ( ) const
inline

◆ getPdfW()

real ph::lta::PDF::getPdfW ( ) const
inline

◆ isEmpty()

bool ph::lta::PDF::isEmpty ( ) const
inline
Returns
Is the PDF in empty domain. Use this method to check whether the PDF is invalid.
Note
It does not mean value == 0 if isEmpty() == true. This method is a convenient helper for checking the PDF's domain.

◆ operator bool()

ph::lta::PDF::operator bool ( ) const
inline

Whether the PDF is sane and positive.

Returns
Same as !isEmpty() && std::isfinite(value) && value > 0.

◆ operator*() [1/2]

real ph::lta::PDF::operator* ( ) const
inline

Convenient method for accessing value. It is an error to get the value if domain is empty.

Returns
value.

◆ operator*() [2/2]

PDF ph::lta::PDF::operator* ( real rhs) const
inline

◆ operator+()

PDF ph::lta::PDF::operator+ ( real rhs) const
inline

Perform arithmetic on value without changing its domain.

◆ operator-()

PDF ph::lta::PDF::operator- ( real rhs) const
inline

◆ operator/()

PDF ph::lta::PDF::operator/ ( real rhs) const
inline

◆ W()

PDF ph::lta::PDF::W ( real pdfW)
inlinestatic
Returns
Solid angle PDF with value == pdfW.

Member Data Documentation

◆ domain

EDomain ph::lta::PDF::domain = EDomain::Empty

The domain on which the PDF is defined. Integrating the PDF over this domain will yield 1.

◆ value

real ph::lta::PDF::value = 0.0_r

Sample value of the PDF.


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