Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::PhaseFunctionSamplingRecord Struct Reference

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 MediumSamplingRecordmRec
 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
 

Detailed Description

Data structure, which contains information required to sample or query a phase function.

Constructor & Destructor Documentation

mitsuba::PhaseFunctionSamplingRecord::PhaseFunctionSamplingRecord ( const MediumSamplingRecord mRec,
const Vector wi,
ETransportMode  mode = ERadiance 
)
inline

Given a medium interaction and an incident direction, construct a query record which can be used to sample an outgoing direction.

Parameters
mRecAn reference to the underlying medium sampling record
wiAn incident direction in world coordinates. This should be a normalized direction vector that points away from the scattering event.
modeThe transported mode (ERadiance or EImportance)
mitsuba::PhaseFunctionSamplingRecord::PhaseFunctionSamplingRecord ( const MediumSamplingRecord mRec,
const Vector wi,
const Vector wo,
ETransportMode  mode = ERadiance 
)
inline

Member Function Documentation

void mitsuba::PhaseFunctionSamplingRecord::reverse ( )
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

Member Data Documentation

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.


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