Data structure, which contains information required to sample or query a phase function. More...
#include <mitsuba/render/phase.h>
Public Member Functions | |
PhaseFunctionSamplingRecord (const MediumSamplingRecord &mRec, const Vector &wi, ETransportMode mode=ERadiance) | |
Given a medium interaction and an incident direction, construct a query record which can be used to sample an outgoing direction. More... | |
PhaseFunctionSamplingRecord (const MediumSamplingRecord &mRec, const Vector &wi, const Vector &wo, ETransportMode mode=ERadiance) | |
void | reverse () |
Reverse the direction of light transport in the record. More... | |
std::string | toString () const |
Public Attributes | |
const MediumSamplingRecord & | mRec |
Reference to a Medium sampling record created by Medium::sampleDistance() More... | |
Vector | wi |
Normalized incident direction vector, which points away from the scattering event. More... | |
Vector | wo |
Normalized outgoing direction vector. More... | |
ETransportMode | mode |
Data structure, which contains information required to sample or query a phase function.
|
inline |
Given a medium interaction and an incident direction, construct a query record which can be used to sample an outgoing direction.
mRec | An reference to the underlying medium sampling record |
wi | An incident direction in world coordinates. This should be a normalized direction vector that points away from the scattering event. |
mode | The transported mode (ERadiance or EImportance) |
|
inline |
|
inline |
Reverse the direction of light transport in the record.
This function essentially swaps wi
and wo
and adjusts mode
appropriately, so that non-symmetric scattering models can be queried in the reverse direction.
std::string mitsuba::PhaseFunctionSamplingRecord::toString | ( | ) | const |
ETransportMode mitsuba::PhaseFunctionSamplingRecord::mode |
const MediumSamplingRecord& mitsuba::PhaseFunctionSamplingRecord::mRec |
Reference to a Medium sampling record created by Medium::sampleDistance()
Vector mitsuba::PhaseFunctionSamplingRecord::wi |
Normalized incident direction vector, which points away from the scattering event.
In Mitsuba, the direction convention for phase functions is the same as for BSDFs, as opposed to much of the literature, where wi
points inwards.
Vector mitsuba::PhaseFunctionSamplingRecord::wo |
Normalized outgoing direction vector.