21#include <Common/assertion.h>
25namespace ph {
class SampleFlow; }
89 Ray* out_sampledRay)
const;
113 const Scene& getScene()
const;
115 const Scene* m_scene;
134 if(!getScene().isIntersecting(ray, &probe))
193 Ray*
const out_sampledRay)
const
200 PH_ASSERT(out_sampledRay);
201 *out_sampledRay =
Ray(
205 std::numeric_limits<real>::max(),
261inline const Scene& SurfaceTracer::getScene()
const
bool isMeasurable() const
Tells whether this evaluation has potential to contribute. All evaluated data should be usable if tru...
Definition BsdfEvalQuery.h:175
Information for obtaining a sample value from BSDF.
Definition BsdfEvalQuery.h:90
Input inputs
Definition BsdfEvalQuery.h:96
Output outputs
Definition BsdfEvalQuery.h:97
Information for the probability of generating a specific BSDF sample.
Definition BsdfPdfQuery.h:66
Output outputs
Definition BsdfPdfQuery.h:73
Input inputs
Definition BsdfPdfQuery.h:72
lta::SidednessAgreement sidedness
Definition BsdfQueryContext.h:19
const math::Vector3R & getL() const
Definition BsdfSampleQuery.h:215
bool isMeasurable() const
Tells whether this sample has potential to contribute. All sampled data should be usable if true is r...
Definition BsdfSampleQuery.h:260
Information for generating a BSDF sample.
Definition BsdfSampleQuery.h:141
Input inputs
Definition BsdfSampleQuery.h:147
BsdfQueryContext context
Definition BsdfSampleQuery.h:146
Output outputs
Definition BsdfSampleQuery.h:148
virtual void evalEmittedEnergy(const SurfaceHit &Xe, math::Spectrum *out_energy) const =0
Evaluate emitted energy from a point on the surface.
Lightweight ray intersection testing and reporting object. If an intersection is found,...
Definition HitProbe.h:27
Represents a ray in space.
Definition Ray.h:21
const math::Vector3R & getDir() const
Definition Ray.h:214
A sample with arbitrary dimensions with fine-grained sampling control.
Definition SampleFlow.h:19
A unified interface for accessing cooked content in a visual world.
Definition Scene.h:27
General information about a ray-surface intersection event.
Definition SurfaceHit.h:59
const Ray & getIncidentRay() const
Convenient method for getRay() where getReason() contains ESurfaceHitReason::IncidentRay.
Definition SurfaceHit.h:175
const Emitter * getSurfaceEmitter() const
Definition SurfaceHit.cpp:61
const SurfaceOptics * getSurfaceOptics() const
Definition SurfaceHit.cpp:67
math::Vector3R getPos() const
Definition SurfaceHit.h:186
const Time & getTime() const
Definition SurfaceHit.h:181
SurfaceHitReason getReason() const
Definition SurfaceHit.h:164
Describes how light interacts with a surface.
Definition SurfaceOptics.h:17
void calcBsdf(BsdfEvalQuery &eval) const
Executes a BSDF evaluation query. Respects sidedness policy.
Definition SurfaceOptics.cpp:17
void genBsdfSample(BsdfSampleQuery &sample, SampleFlow &sampleFlow) const
Executes a BSDF sample query. Respects sidedness policy.
Definition SurfaceOptics.cpp:32
void calcBsdfPdf(BsdfPdfQuery &pdfQuery) const
Executes a BSDF sample PDF query. Respects sidedness policy.
Definition SurfaceOptics.cpp:54
constexpr bool hasExactly(const FlagsSet &flagsSet) const
Checks whether this instance contains exactly the specified flags. No more, no less.
Definition TBitFlags.ipp:99
Definition SidednessAgreement.h:32
void adjustForSidednessAgreement(SurfaceHit &X) const
Definition SidednessAgreement.h:285
bool isSidednessAgreed(const math::Vector3R &Ng, const math::Vector3R &Ns, const math::Vector3R &vec) const
Definition SidednessAgreement.h:104
Algorithms for various hit point adjustments. For surface escaping routines, the generated ray is not...
Definition SurfaceHitRefinery.h:31
Common operations for surface tracing. This class also handles many subtle cases for surface tracing....
Definition SurfaceTracer.h:35
bool doBsdfPdfQuery(BsdfPdfQuery &bsdfPdfQuery) const
Definition SurfaceTracer.h:225
bool doBsdfEvaluation(BsdfEvalQuery &bsdfEval) const
Definition SurfaceTracer.h:211
bool traceNextSurfaceFrom(const SurfaceHit &X, const Ray &ray, const SidednessAgreement &sidedness, SurfaceHit *out_X) const
Find the next surface from a location. This variant also refines the surface hit point before startin...
Definition SurfaceTracer.h:145
bool bsdfSampleNextSurface(BsdfSampleQuery &bsdfSample, SampleFlow &sampleFlow, SurfaceHit *out_X) const
Uses BSDF sample to trace the next surface.
Definition SurfaceTracer.h:158
bool sampleZeroBounceEmission(const SurfaceHit &Xe, const SidednessAgreement &sidedness, math::Spectrum *out_Le) const
Definition SurfaceTracer.h:239
bool doBsdfSample(BsdfSampleQuery &bsdfSample, SampleFlow &sampleFlow) const
Definition SurfaceTracer.h:176
SurfaceTracer(const Scene *scene)
Definition SurfaceTracer.h:120
bool traceNextSurface(const Ray &ray, const SidednessAgreement &sidedness, SurfaceHit *out_X) const
Find the next surface. This variant does not refine the surface hit point. If refining is desired,...
Definition SurfaceTracer.h:126
Definition TTristimulusSpectrum.h:11
Light transport algorithms.
Definition enums.h:6
The root for all renderer implementations.
Definition EEngineProject.h:6
TEnumFlags< ESurfaceHitReason > SurfaceHitReason
Definition SurfaceHit.h:54