18 typename T::ViewPathHandlerTag;
24template<
typename Derived>
42 std::size_t pathLength,
63template<
typename Derived>
69 static_assert(
requires (
76 derived.impl_onReceiverSampleStart(
83 "A view path handler type must implement a method callable as "
84 "`impl_onReceiverSampleStart(math::Vector2D{}, math::Vector2S{}, math::Spectrum{}) -> bool`.");
86 return static_cast<Derived&
>(*this).impl_onReceiverSampleStart(
92template<
typename Derived>
94 const std::size_t pathLength,
98 static_assert(
requires (
100 std::size_t pathLength,
105 derived.impl_onPathHitSurface(
112 "A view path handler type must implement a method callable as "
113 "`impl_onPathHitSurface(std::size_t{}, SurfaceHit{}, math::Spectrum{}) -> ViewPathTracingPolicy`.");
115 return static_cast<Derived&
>(*this).impl_onPathHitSurface(
121template<
typename Derived>
124 static_assert(
requires (Derived derived)
126 { derived.impl_onReceiverSampleEnd() } ->
CSame<void>;
128 "A view path handler type must implement a method callable as "
129 "`impl_onReceiverSampleEnd() -> void`.");
131 static_cast<Derived&
>(*this).impl_onReceiverSampleEnd();
134template<
typename Derived>
137 static_assert(
requires (Derived derived)
139 { derived.impl_onSampleBatchFinished() } ->
CSame<void>;
141 "A view path handler type must implement a method callable as "
142 "`impl_onSampleBatchFinished() -> void`.");
144 static_cast<Derived&
>(*this).impl_onSampleBatchFinished();
General information about a ray-surface intersection event.
Definition SurfaceHit.h:59
Process and control a view path tracing process. Derived classes need to implement all methods with "...
Definition TViewPathHandler.h:26
void onSampleBatchFinished()
Called after a batch of receiver samples has been consumed. Sample batch is as defined by the sample ...
Definition TViewPathHandler.h:135
void onReceiverSampleEnd()
Called after a receiver sample has ended.
Definition TViewPathHandler.h:122
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.
Definition TViewPathHandler.h:93
void ViewPathHandlerTag
Definition TViewPathHandler.h:28
PH_DEFINE_INLINE_RULE_OF_5_MEMBERS(TViewPathHandler)
bool onReceiverSampleStart(const math::Vector2D &rasterCoord, const math::Vector2S &sampleIndex, const math::Spectrum &pathThroughput)
Called after a receiver sample is generated.
Definition TViewPathHandler.h:64
Specifying and querying policies for tracing view path.
Definition ViewPathTracingPolicy.h:24
Definition TTristimulusSpectrum.h:11
Definition TViewPathHandler.h:16
The root for all renderer implementations.
Definition EEngineProject.h:6