Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::TViewPathHandler< Derived > Class Template Reference

Process and control a view path tracing process. Derived classes need to implement all methods with "impl_" prefixed names and with the exact signature. More...

#include <TViewPathHandler.h>

Inheritance diagram for ph::TViewPathHandler< Derived >:
ph::TVPMRadianceEvaluator< Photon, PhotonMap >

Public Types

using ViewPathHandlerTag = void
 

Public Member Functions

bool onReceiverSampleStart (const math::Vector2D &rasterCoord, const math::Vector2S &sampleIndex, const math::Spectrum &pathThroughput)
 Called after a receiver sample is generated.
 
auto onPathHitSurface (std::size_t pathLength, const SurfaceHit &surfaceHit, const math::Spectrum &pathThroughput) -> ViewPathTracingPolicy
 Called after the view path hits a surface, with corresponding hit information given.
 
void onReceiverSampleEnd ()
 Called after a receiver sample has ended.
 
void onSampleBatchFinished ()
 Called after a batch of receiver samples has been consumed. Sample batch is as defined by the sample generator used.
 

Protected Member Functions

 PH_DEFINE_INLINE_RULE_OF_5_MEMBERS (TViewPathHandler)
 

Detailed Description

template<typename Derived>
class ph::TViewPathHandler< Derived >

Process and control a view path tracing process. Derived classes need to implement all methods with "impl_" prefixed names and with the exact signature.

Member Typedef Documentation

◆ ViewPathHandlerTag

template<typename Derived >
using ph::TViewPathHandler< Derived >::ViewPathHandlerTag = void

Member Function Documentation

◆ onPathHitSurface()

template<typename Derived >
auto ph::TViewPathHandler< Derived >::onPathHitSurface ( std::size_t pathLength,
const SurfaceHit & surfaceHit,
const math::Spectrum & pathThroughput ) -> ViewPathTracingPolicy

Called after the view path hits a surface, with corresponding hit information given.

Returns
A policy for controlling how to trace the next path.

◆ onReceiverSampleEnd()

template<typename Derived >
void ph::TViewPathHandler< Derived >::onReceiverSampleEnd ( )

Called after a receiver sample has ended.

◆ onReceiverSampleStart()

template<typename Derived >
bool ph::TViewPathHandler< Derived >::onReceiverSampleStart ( const math::Vector2D & rasterCoord,
const math::Vector2S & sampleIndex,
const math::Spectrum & pathThroughput )

Called after a receiver sample is generated.

Returns
Whether this receiver sample should be used.

◆ onSampleBatchFinished()

template<typename Derived >
void ph::TViewPathHandler< Derived >::onSampleBatchFinished ( )

Called after a batch of receiver samples has been consumed. Sample batch is as defined by the sample generator used.

◆ PH_DEFINE_INLINE_RULE_OF_5_MEMBERS()

template<typename Derived >
ph::TViewPathHandler< Derived >::PH_DEFINE_INLINE_RULE_OF_5_MEMBERS ( TViewPathHandler< Derived > )
protected

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