21 #ifndef LIB_LIGHTMETRICA_BPT_SUBPATH_H
22 #define LIB_LIGHTMETRICA_BPT_SUBPATH_H
24 #include "bpt.common.h"
25 #include "math.types.h"
26 #include "surfacegeometry.h"
27 #include "transportdirection.h"
42 enum class BPTPathVertexType
62 LM_DISABLE_COPY_AND_MOVE(BPTPathVertex);
121 LM_PUBLIC_API
BPTSubpath(TransportDirection transportDir);
125 LM_DISABLE_COPY_AND_MOVE(BPTSubpath);
133 LM_PUBLIC_API
void Clear();
146 LM_PUBLIC_API
void DebugPrint(
size_t n)
const;
192 TransportDirection transportDir;
193 std::vector<BPTPathVertex*> vertices;
199 #endif // LIB_LIGHTMETRICA_BPT_SUBPATH_H
LM_PUBLIC_API void DebugPrint() const
Definition: bpt.subpath.cpp:130
Definition: bpt.pool.h:34
BPTPathVertexType type
Vertex type.
Definition: bpt.subpath.h:84
Definition: generalizedbsdf.h:168
const Camera * areaE
Camera associated with surface.
Definition: bpt.subpath.h:103
Math::PDFEval pdfP
PDF evaluation for positional component.
Definition: bpt.subpath.h:90
LM_PUBLIC_API void Clear()
Definition: bpt.subpath.cpp:125
bool Degenerated() const
Definition: bpt.subpath.cpp:48
LM_PUBLIC_API BPTPathVertex * Vertex(int i) const
Definition: bpt.subpath.cpp:150
const Light * areaL
Light associated with surface.
Definition: bpt.subpath.h:102
LM_PUBLIC_API void Sample(const Scene &scene, Sampler &sampler, BPTPathVertexPool &pool, int rrDepth, int maxPathVertices)
Definition: bpt.subpath.cpp:155
SurfaceGeometry geom
Surface geometry information.
Definition: bpt.subpath.h:85
Math::Vec3 weight[2]
Value of f_s / p_{^} for each transport direction.
Definition: bpt.subpath.h:96
LM_PUBLIC_API int NumVertices() const
Definition: bpt.subpath.cpp:145
Math::PDFEval pdfD[2]
PDF evaluation for directional component for each transport direction.
Definition: bpt.subpath.h:97
Definition: surfacegeometry.h:36
Math::Float SubpathSelectionProbability(int vs) const
Definition: bpt.subpath.cpp:386
Math::Vec3 wi
Incoming ray direction.
Definition: bpt.subpath.h:104
Math::Vec3 wo
Outgoing ray direction.
Definition: bpt.subpath.h:105
const GeneralizedBSDF * bsdf
Generalized BSDF (note that BSDF and light or camera can point to different instances).
Definition: bpt.subpath.h:101
Definition: bpt.subpath.h:54
int componentType
Sampled component type.
Definition: bpt.subpath.h:100
TransportDirection transportDir
Transport direction.
Definition: bpt.subpath.h:99
Math::Vec3 EvaluateSubpathAlpha(int vs, Math::Vec2 &rasterPosition) const
Definition: bpt.subpath.cpp:337
Definition: bpt.subpath.h:117
const Emitter * emitter
Emitter. The entry is required because of area light or camera.
Definition: bpt.subpath.h:91
Math::PDFEval pdfRR
PDF evaluation for Russian roulette.
Definition: bpt.subpath.h:98
void DebugPrint() const
Definition: bpt.subpath.cpp:53