Common operations for surface tracing. This class also handles many subtle cases for surface tracing. You may take the implementations here as reference if a more fine-grained control is needed for a custom operation.
More...
#include <SurfaceTracer.h>
|
| SurfaceTracer (const Scene *scene) |
|
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, see traceNextSurfaceFrom() .
|
|
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 starting the trace.
|
|
bool | bsdfSampleNextSurface (BsdfSampleQuery &bsdfSample, SampleFlow &sampleFlow, SurfaceHit *out_X) const |
| Uses BSDF sample to trace the next surface.
|
|
bool | doBsdfSample (BsdfSampleQuery &bsdfSample, SampleFlow &sampleFlow) const |
|
bool | doBsdfSample (BsdfSampleQuery &bsdfSample, SampleFlow &sampleFlow, Ray *out_sampledRay) const |
|
bool | doBsdfEvaluation (BsdfEvalQuery &bsdfEval) const |
|
bool | doBsdfPdfQuery (BsdfPdfQuery &bsdfPdfQuery) const |
|
bool | sampleZeroBounceEmission (const SurfaceHit &Xe, const SidednessAgreement &sidedness, math::Spectrum *out_Le) const |
|
Common operations for surface tracing. This class also handles many subtle cases for surface tracing. You may take the implementations here as reference if a more fine-grained control is needed for a custom operation.
◆ SurfaceTracer()
ph::lta::SurfaceTracer::SurfaceTracer |
( |
const Scene * | scene | ) |
|
|
inlineexplicit |
◆ bsdfSampleNextSurface()
Uses BSDF sample to trace the next surface.
- Returns
- Is the next surface found. Output parameters are not usable if
false
is returned.
◆ doBsdfEvaluation()
bool ph::lta::SurfaceTracer::doBsdfEvaluation |
( |
BsdfEvalQuery & | bsdfEval | ) |
const |
|
inline |
- Returns
- Whether the BSDF has potential to contribute.
◆ doBsdfPdfQuery()
bool ph::lta::SurfaceTracer::doBsdfPdfQuery |
( |
BsdfPdfQuery & | bsdfPdfQuery | ) |
const |
|
inline |
- Returns
- Whether the PDF is non-zero and has a sane value.
◆ doBsdfSample() [1/2]
- Returns
- Whether the BSDF sample has potential to contribute.
◆ doBsdfSample() [2/2]
- Returns
- Whether the BSDF sample has potential to contribute. Output parameters are not usable if
false
is returned.
◆ sampleZeroBounceEmission()
- Parameters
-
out_Le | The sampled emitted energy of Xe in the opposite direction of incident ray. Does not contain any weighting. |
- Returns
- Whether the sample has potential to contribute. Output parameters are not usable if
false
is returned.
◆ traceNextSurface()
Find the next surface. This variant does not refine the surface hit point. If refining is desired, see traceNextSurfaceFrom()
.
- Parameters
-
ray | The ray that is used for finding the next surface. |
sidedness | Sidedness policy. |
- Returns
- out_X The next surface.
-
Is the next surface found. Output parameters are not usable if
false
is returned.
- Note
- If you are tracing from a surface (not a point from the mid-air),
traceNextSurfaceFrom(const SurfaceHit&, const Ray&, const SidednessAgreement&, SurfaceHit*)
may be more robust.
◆ traceNextSurfaceFrom()
Find the next surface from a location. This variant also refines the surface hit point before starting the trace.
- Parameters
-
X | The location to start the find from. Can also use the object as out_X . |
ray | The ray that is used for finding the next surface. |
sidedness | Sidedness policy. |
- Returns
- out_X The next surface.
-
Is the next surface found. Output parameters are not usable if
false
is returned.
The documentation for this class was generated from the following file: