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

Radiance query record data structure used by SamplingIntegrator. More...

#include <mitsuba/render/integrator.h>

Public Types

enum  ERadianceQuery {
  EEmittedRadiance = 0x0001, ESubsurfaceRadiance = 0x0002, EDirectSurfaceRadiance = 0x0004, EIndirectSurfaceRadiance = 0x0008,
  ECausticRadiance = 0x0010, EDirectMediumRadiance = 0x0020, EIndirectMediumRadiance = 0x0040, EDistance = 0x0080,
  EOpacity = 0x0100, EIntersection = 0x0200, EVolumeRadiance = EDirectMediumRadiance | EIndirectMediumRadiance, ERadianceNoEmission,
  ERadiance = ERadianceNoEmission | EEmittedRadiance, ESensorRay = ERadiance | EOpacity
}
 List of suported query types. These can be combined by a binary OR. More...
 
enum  EExtraFlags { ECacheQuery = 0x01, EAdaptiveQuery = 0x02 }
 Additional flags that can be specified in the extra field. More...
 

Public Member Functions

 RadianceQueryRecord ()
 Construct an invalid radiance query record. More...
 
 RadianceQueryRecord (const Scene *scene, Sampler *sampler)
 Construct a radiance query record for the given scene and sampler. More...
 
 RadianceQueryRecord (const RadianceQueryRecord &rRec)
 Copy constructor. More...
 
void newQuery (int _type, const Medium *_medium)
 Begin a new query of the given type. More...
 
void recursiveQuery (const RadianceQueryRecord &parent, int _type)
 Initialize the query record for a recursive query. More...
 
void recursiveQuery (const RadianceQueryRecord &parent)
 Initialize the query record for a recursive query. More...
 
bool rayIntersect (const RayDifferential &ray)
 Search for a ray intersection. More...
 
Point2 nextSample2D ()
 Retrieve a 2D sample. More...
 
Float nextSample1D ()
 Retrieve a 1D sample. More...
 
std::string toString () const
 Return a string representation. More...
 

Public Attributes

int type
 Query type (*) More...
 
const Scenescene
 Pointer to the associated scene. More...
 
Samplersampler
 Sample generator. More...
 
const Mediummedium
 Pointer to the current medium (*) More...
 
int depth
 Current depth value (# of light bounces) (*) More...
 
Intersection its
 Surface interaction data structure (*) More...
 
Float alpha
 Opacity value of the associated pixel (*) More...
 
Float dist
 
int extra
 

Detailed Description

Radiance query record data structure used by SamplingIntegrator.

Member Enumeration Documentation

Additional flags that can be specified in the extra field.

Enumerator
ECacheQuery 

This is a query by an irradiance cache.

EAdaptiveQuery 

This is a query by an adaptive integrator.

List of suported query types. These can be combined by a binary OR.

Enumerator
EEmittedRadiance 

Emitted radiance from a luminaire intersected by the ray.

ESubsurfaceRadiance 

Emitted radiance from a subsurface integrator */.

EDirectSurfaceRadiance 

Direct (surface) radiance */.

EIndirectSurfaceRadiance 

Indirect (surface) radiance, where the last bounce did not go through a Dirac delta BSDF.

ECausticRadiance 

Indirect (surface) radiance, where the last bounce went through a Dirac delta BSDF.

EDirectMediumRadiance 

In-scattered radiance due to volumetric scattering (direct)

EIndirectMediumRadiance 

In-scattered radiance due to volumetric scattering (indirect)

EDistance 

Distance to the next surface intersection.

EOpacity 

Store an opacity value, which is equal to 1 when a shape was intersected and 0 when the ray passes through empty space. When there is a participating medium, it can also take on fractional values.

EIntersection 

A ray intersection may need to be performed. This can be set to zero if the caller has already provided the intersection.

EVolumeRadiance 
ERadianceNoEmission 

Radiance query without emitted radiance, ray intersection required.

ERadiance 

Default radiance query, ray intersection required.

ESensorRay 

Radiance + opacity.

Constructor & Destructor Documentation

mitsuba::RadianceQueryRecord::RadianceQueryRecord ( )
inline

Construct an invalid radiance query record.

mitsuba::RadianceQueryRecord::RadianceQueryRecord ( const Scene scene,
Sampler sampler 
)
inline

Construct a radiance query record for the given scene and sampler.

mitsuba::RadianceQueryRecord::RadianceQueryRecord ( const RadianceQueryRecord rRec)
inline

Copy constructor.

Member Function Documentation

void mitsuba::RadianceQueryRecord::newQuery ( int  _type,
const Medium _medium 
)
inline

Begin a new query of the given type.

Float RadianceQueryRecord::nextSample1D ( )
inline

Retrieve a 1D sample.

Point2 RadianceQueryRecord::nextSample2D ( )
inline

Retrieve a 2D sample.

bool RadianceQueryRecord::rayIntersect ( const RayDifferential ray)
inline

Search for a ray intersection.

This function does several things at once: if the intersection has already been provided, it returns.

Otherwise, it

  1. performs the ray intersection
  2. computes the transmittance due to participating media and stores it in transmittance.
  3. sets the alpha value (if EAlpha is set in type)
  4. sets the distance value (if EDistance is set in type)
  5. clears the EIntersection flag in type
Returns
true if there is a valid intersection.
void mitsuba::RadianceQueryRecord::recursiveQuery ( const RadianceQueryRecord parent,
int  _type 
)
inline

Initialize the query record for a recursive query.

void mitsuba::RadianceQueryRecord::recursiveQuery ( const RadianceQueryRecord parent)
inline

Initialize the query record for a recursive query.

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

Return a string representation.

Member Data Documentation

Float mitsuba::RadianceQueryRecord::alpha

Opacity value of the associated pixel (*)

int mitsuba::RadianceQueryRecord::depth

Current depth value (# of light bounces) (*)

Float mitsuba::RadianceQueryRecord::dist

Ray distance to the first surface interaction (if requested by the query type EDistance) (*)

int mitsuba::RadianceQueryRecord::extra

Internal flag, which can be used to pass additional information amonst recursive calls inside an integrator. The use is dependent on the particular integrator implementation. (*)

Intersection mitsuba::RadianceQueryRecord::its

Surface interaction data structure (*)

const Medium* mitsuba::RadianceQueryRecord::medium

Pointer to the current medium (*)

Sampler* mitsuba::RadianceQueryRecord::sampler

Sample generator.

const Scene* mitsuba::RadianceQueryRecord::scene

Pointer to the associated scene.

int mitsuba::RadianceQueryRecord::type

Query type (*)


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