Support Forum       G3D Web Page     
Public Member Functions | Public Attributes | List of all members
G3D::PathTracer::BufferSet Class Reference

Per-path data passed between major routines. More...

Public Member Functions

void fastRemove (int i)
 Removes element i from all arrays, including either outputIndex or outputCoord. More...
 
void resize (size_t n)
 Does not resize outputIndex or outputCoord. More...
 
size_t size () const
 

Public Attributes

Array< Radiance3direct
 Scattered radiance due to the selected light (which may be an emissive surface), IF it is visible: (B_j * |w_j . More...
 
Array< bool > impulseRay
 True if the previous scattering event was an impulse (or primary ray). More...
 
Array< bool > lightShadowed
 False if the light that created the direct value is visible. More...
 
Array< Color3modulation
 How much the surfaces between the eye and the current path node have already modulated the contribution observed due to the BSDF. More...
 
Array< PixelCoordoutputCoord
 Location in the output image to write the final radiance to. More...
 
Array< int > outputIndex
 Location in the output buffer to write the final radiance to. More...
 
Array< Rayray
 
Array< RayshadowRay
 Shadow rays corresponding to the direct values. More...
 
Array< shared_ptr< Surfel > > surfel
 Surfels hit by primary and indirect rays (may be nullptr if each missed) More...
 

Detailed Description

Per-path data passed between major routines.

Configured as a structure of arrays instead of an array of structures s othat the ray and surfel buffers can be directly passed to G3D::TriTree routines.

Member Function Documentation

◆ fastRemove()

void G3D::PathTracer::BufferSet::fastRemove ( int  i)
inline

Removes element i from all arrays, including either outputIndex or outputCoord.

◆ resize()

void G3D::PathTracer::BufferSet::resize ( size_t  n)
inline

Does not resize outputIndex or outputCoord.

◆ size()

size_t G3D::PathTracer::BufferSet::size ( ) const
inline

Member Data Documentation

◆ direct

Array<Radiance3> G3D::PathTracer::BufferSet::direct

Scattered radiance due to the selected light (which may be an emissive surface), IF it is visible: (B_j * |w_j .

n| * f) / p_j The actual light position is implicitly encoded in the shadowRay.

Referenced by fastRemove(), and resize().

◆ impulseRay

Array<bool> G3D::PathTracer::BufferSet::impulseRay

True if the previous scattering event was an impulse (or primary ray).

Light surfaces do not contribute to indirect light unless the previous event was an impulse. This avoids double-counting the lights.

Referenced by fastRemove(), and resize().

◆ lightShadowed

Array<bool> G3D::PathTracer::BufferSet::lightShadowed

False if the light that created the direct value is visible.

Referenced by fastRemove(), and resize().

◆ modulation

Array<Color3> G3D::PathTracer::BufferSet::modulation

How much the surfaces between the eye and the current path node have already modulated the contribution observed due to the BSDF.

Initialized based on the number of rays per pixel.

Referenced by fastRemove(), and resize().

◆ outputCoord

Array<PixelCoord> G3D::PathTracer::BufferSet::outputCoord

Location in the output image to write the final radiance to.

Referenced by fastRemove().

◆ outputIndex

Array<int> G3D::PathTracer::BufferSet::outputIndex

Location in the output buffer to write the final radiance to.

Referenced by fastRemove().

◆ ray

Array<Ray> G3D::PathTracer::BufferSet::ray

Referenced by fastRemove(), resize(), and size().

◆ shadowRay

Array<Ray> G3D::PathTracer::BufferSet::shadowRay

Shadow rays corresponding to the direct values.

Referenced by fastRemove(), and resize().

◆ surfel

Array<shared_ptr<Surfel> > G3D::PathTracer::BufferSet::surfel

Surfels hit by primary and indirect rays (may be nullptr if each missed)

Referenced by fastRemove(), and resize().


documentation generated on Wed Nov 24 2021 08:01:59 using doxygen 1.8.15