Record for solid-angle based area sampling techniques. More...
#include <mitsuba/render/common.h>
Public Member Functions | |
DirectSamplingRecord () | |
Create an invalid direct sampling record. More... | |
DirectSamplingRecord (const Point &ref, Float time) | |
Create an new direct sampling record for a reference point ref located somewhere in space (i.e. not on a surface) More... | |
DirectSamplingRecord (const Intersection &refIts) | |
Create an new direct sampling record for a reference point ref located on a surface. More... | |
DirectSamplingRecord (const MediumSamplingRecord &mRec) | |
Create an new direct sampling record for a reference point ref located in a medium. More... | |
void | setQuery (const Ray &ray, const Intersection &its, EMeasure measure=ESolidAngle) |
Create a direct sampling record, which can be used to query the density of a surface position (where there reference point lies on a surface) More... | |
std::string | toString () const |
Return a human-readable description of the record. More... | |
Public Member Functions inherited from mitsuba::PositionSamplingRecord | |
PositionSamplingRecord () | |
Create an invalid position sampling record. More... | |
PositionSamplingRecord (Float time) | |
Create a new position sampling record that can be passed e.g. to Shape::samplePosition. More... | |
PositionSamplingRecord (const Intersection &its, EMeasure measure=EArea) | |
Create a position sampling record from a surface intersection. More... | |
std::string | toString () const |
Return a human-readable description of the record. More... | |
Public Attributes | |
Point | ref |
Reference point for direct sampling. More... | |
Normal | refN |
Optional: normal vector associated with the reference point. More... | |
Vector | d |
Unit direction from the reference point to the target direction. More... | |
Float | dist |
Distance from the reference point to the target direction. More... | |
Public Attributes inherited from mitsuba::PositionSamplingRecord | |
Point | p |
Sampled position. More... | |
Float | time |
Associated time value. More... | |
Normal | n |
Sampled surface normal (if applicable) More... | |
Float | |
Probability density at the sample. More... | |
EMeasure | measure |
Denotes the measure associated with the sample. More... | |
Point2 | uv |
Optional: 2D sample position associated with the record. More... | |
const ConfigurableObject * | object |
Optional: Pointer to an associated object. More... | |
Record for solid-angle based area sampling techniques.
This sampling record is used to implement techniques that randomly pick a position on the surface of an object with the goal of importance sampling a quantity that is defined over the sphere seen from a given reference point.
This general approach for sampling positions is named "direct" sampling throughout Mitsuba motivated by direct illumination rendering techniques, which represent the most important application.
This record inherits all fields from PositionSamplingRecord and extends it with two useful quantities that are cached so that they don't need to be recomputed many times: the unit direction and length from the reference position to the sampled point.
|
inline |
Create an invalid direct sampling record.
Create an new direct sampling record for a reference point ref
located somewhere in space (i.e. not on a surface)
ref | The reference point |
time | An associated time value |
|
inline |
Create an new direct sampling record for a reference point ref
located on a surface.
its | The reference point specified using an intersection record |
|
inline |
Create an new direct sampling record for a reference point ref
located in a medium.
mRec | The reference point specified using an medium sampling record |
|
inline |
Create a direct sampling record, which can be used to query the density of a surface position (where there reference point lies on a surface)
ray | Reference to the ray that generated the intersection its . The ray origin must be located at refIts.p |
its | A surface intersection record (usually on an emitter) |
std::string mitsuba::DirectSamplingRecord::toString | ( | ) | const |
Return a human-readable description of the record.
Vector mitsuba::DirectSamplingRecord::d |
Unit direction from the reference point to the target direction.
Float mitsuba::DirectSamplingRecord::dist |
Distance from the reference point to the target direction.
Point mitsuba::DirectSamplingRecord::ref |
Reference point for direct sampling.
Normal mitsuba::DirectSamplingRecord::refN |
Optional: normal vector associated with the reference point.
When nonzero, the direct sampling method can use the normal vector to sample according to the projected solid angle at ref
.