This data structured contains all information that is required to sample or query a BSDF. More...
#include <mitsuba/render/bsdf.h>
Public Member Functions | |
BSDFSamplingRecord (const Intersection &its, Sampler *sampler, ETransportMode mode=ERadiance) | |
Given a surface interaction and an incident direction, construct a query record which can be used to sample an outgoing direction. More... | |
BSDFSamplingRecord (const Intersection &its, const Vector &wo, ETransportMode mode=ERadiance) | |
Given a surface interaction an an incident/exitant direction pair (wi, wo), create a query record to evaluate the BSDF or its sampling density. More... | |
BSDFSamplingRecord (const Intersection &its, const Vector &wi, const Vector &wo, ETransportMode mode=ERadiance) | |
Given a surface interaction an an incident/exitant direction pair (wi, wo), create a query record to evaluate the BSDF or its sampling density. More... | |
void | reverse () |
Reverse the direction of light transport in the record. More... | |
std::string | toString () const |
Return a string representation. More... | |
Public Attributes | |
const Intersection & | its |
Reference to the underlying surface interaction. More... | |
Sampler * | sampler |
Pointer to a Sampler instance (optional). More... | |
Vector | wi |
Normalized incident direction in local coordinates. More... | |
Vector | wo |
Normalized outgoing direction in local coordinates. More... | |
Float | eta |
Relative index of refraction in the sampled direction. More... | |
ETransportMode | mode |
Transported mode (radiance or importance) More... | |
unsigned int | typeMask |
Bit mask containing the requested BSDF component types that should be sampled/evaluated. More... | |
int | component |
Integer value specifying the requested BSDF component index that should be sampled/evaluated (for multi-lobed BSDFs). More... | |
unsigned int | sampledType |
Stores the component type that was sampled by BSDF::sample() More... | |
int | sampledComponent |
Stores the component index that was sampled by BSDF::sample() More... | |
This data structured contains all information that is required to sample or query a BSDF.
|
inlineexplicit |
Given a surface interaction and an incident direction, construct a query record which can be used to sample an outgoing direction.
By default, all components will be sampled irregardless of what measure they live on. For convenience, this function uses the local incident direction vector contained in the supplied intersection record. The mode of transport is set to ERadiance – the mode fie
its | An reference to the underlying intersection record |
sampler | A source of (pseudo-) random numbers. Note that this sampler is only used when the scattering model for some reason needs more than the two unformly distributed numbers supplied in the BSDF::sample() methods |
mode | The transported mode (ERadiance or EImportance) |
|
inline |
Given a surface interaction an an incident/exitant direction pair (wi, wo), create a query record to evaluate the BSDF or its sampling density.
For convenience, this function uses the local incident direction vector contained in the supplied intersection record.
its | An reference to the underlying intersection record |
wo | An outgoing direction in local coordinates. This should be a normalized direction vector that points away from the scattering event. |
mode | The transported mode (ERadiance or EImportance) |
|
inline |
Given a surface interaction an an incident/exitant direction pair (wi, wo), create a query record to evaluate the BSDF or its sampling density.
its | An reference to the underlying intersection record |
wi | An incident direction in local coordinates. This should be a normalized direction vector that points away from the scattering event. |
wo | An outgoing direction in local coordinates. This should be a normalized direction vector that points away from the scattering event. |
mode | The transported mode (ERadiance or EImportance) |
|
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::BSDFSamplingRecord::toString | ( | ) | const |
Return a string representation.
int mitsuba::BSDFSamplingRecord::component |
Integer value specifying the requested BSDF component index that should be sampled/evaluated (for multi-lobed BSDFs).
After sampling has been performed, the component index is stored inside sampledComponent.
Float mitsuba::BSDFSamplingRecord::eta |
Relative index of refraction in the sampled direction.
const Intersection& mitsuba::BSDFSamplingRecord::its |
Reference to the underlying surface interaction.
ETransportMode mitsuba::BSDFSamplingRecord::mode |
Transported mode (radiance or importance)
This information is required for rendering with non-reciprocal BSDFs such as transmission through a dielectric material
int mitsuba::BSDFSamplingRecord::sampledComponent |
Stores the component index that was sampled by BSDF::sample()
unsigned int mitsuba::BSDFSamplingRecord::sampledType |
Stores the component type that was sampled by BSDF::sample()
Sampler* mitsuba::BSDFSamplingRecord::sampler |
unsigned int mitsuba::BSDFSamplingRecord::typeMask |
Bit mask containing the requested BSDF component types that should be sampled/evaluated.
Set to BSDF::EAll
by default. After sampling has been performed, the component type is stored inside sampledType.
Vector mitsuba::BSDFSamplingRecord::wi |
Normalized incident direction in local coordinates.
Mitsuba uses the convention that wi
and wo
point away from the scattering event
Vector mitsuba::BSDFSamplingRecord::wo |
Normalized outgoing direction in local coordinates.
Mitsuba uses the convention that wi
and wo
point away from the scattering event