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

Generic sampling record for directions. More...

#include <mitsuba/render/common.h>

Public Member Functions

std::string toString () const
 Return a human-readable description of the record. More...
 
 DirectionSamplingRecord ()
 Create an uninitialized position sampling record. More...
 
 DirectionSamplingRecord (const Vector &d, EMeasure measure=ESolidAngle)
 Create a direction sampling record filled with a specified direction. More...
 
 DirectionSamplingRecord (const Intersection &its, EMeasure measure=ESolidAngle)
 Create a direction sampling record from a surface intersection. More...
 

Public Attributes

Vector d
 Sampled direction. More...
 
Float pdf
 Probability density at the sample. More...
 
EMeasure measure
 Measure associated with the density function. More...
 

Detailed Description

Generic sampling record for directions.

This sampling record is used to implement techniques that randomly draw a unit vector from a subset of the sphere and furthermore provide auxilary information about the sample.

Apart from returning the sampled direction, the responsible sampling method must annotate the record with the associated probability density and measure.

Constructor & Destructor Documentation

mitsuba::DirectionSamplingRecord::DirectionSamplingRecord ( )
inline

Create an uninitialized position sampling record.

The resulting data structure is meant to be used to generate a new direction sample.

See Also
Emitter::sampleDirection
mitsuba::DirectionSamplingRecord::DirectionSamplingRecord ( const Vector d,
EMeasure  measure = ESolidAngle 
)
inline

Create a direction sampling record filled with a specified direction.

The resulting data structure is meant to be used to query the density of a direction sampling technique

See Also
Emitter::pdfDirection
mitsuba::DirectionSamplingRecord::DirectionSamplingRecord ( const Intersection its,
EMeasure  measure = ESolidAngle 
)
inline

Create a direction sampling record from a surface intersection.

This is useful to determine the hypothetical sampling density of a direction after hitting it using standard ray tracing. This happens for instance when hitting the camera aperture in bidirectional rendering techniques.

Member Function Documentation

std::string mitsuba::DirectionSamplingRecord::toString ( ) const

Return a human-readable description of the record.

Member Data Documentation

Vector mitsuba::DirectionSamplingRecord::d

Sampled direction.

EMeasure mitsuba::DirectionSamplingRecord::measure

Measure associated with the density function.

Float mitsuba::DirectionSamplingRecord::pdf

Probability density at the sample.


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