Lightmetrica  0.0.1.50dbee3 (yosakoi)
 All Classes Functions Variables Typedefs Enumerations Enumerator
bpt.fullpath.h
1 /*
2  Lightmetrica : A research-oriented renderer
3 
4  Copyright (c) 2014 Hisanari Otsu
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #pragma once
21 #ifndef LIB_LIGHTMETRICA_BPT_FULL_PATH_H
22 #define LIB_LIGHTMETRICA_BPT_FULL_PATH_H
23 
24 #include "bpt.common.h"
25 #include "math.types.h"
26 #include "transportdirection.h"
27 
28 LM_NAMESPACE_BEGIN
29 
30 class BPTPathVertex;
31 class BPTSubpath;
32 class Scene;
33 
39 {
40 public:
41 
50  LM_PUBLIC_API BPTFullPath(int s, int t, const BPTSubpath& lightSubpath, const BPTSubpath& eyeSubpath);
51 
52 private:
53 
54  LM_DISABLE_COPY_AND_MOVE(BPTFullPath);
55 
56 public:
57 
64  LM_PUBLIC_API Math::Vec3 EvaluateUnweightContribution(const Scene& scene, Math::Vec2& rasterPosition) const;
65 
72  LM_PUBLIC_API Math::Float EvaluateFullpathPDF(int i) const;
73 
82  LM_PUBLIC_API Math::Float EvaluateFullpathPDFRatio(int i) const;
83 
90  LM_PUBLIC_API bool FullpathPDFIsZero(int i) const;
91 
97  LM_PUBLIC_API Math::Float PathSelectionProbability() const;
98 
103  LM_PUBLIC_API void DebugPrint() const;
104 
105 public:
106 
112  LM_PUBLIC_API const BPTPathVertex* FullPathVertex(int i) const;
113 
120  LM_PUBLIC_API Math::PDFEval FullPathVertexDirectionPDF(int i, TransportDirection transportDir) const;
121 
122 public:
123 
124  int s;
125  int t;
128  Math::PDFEval pdfDL[2];
129  Math::PDFEval pdfDE[2];
130 
131 };
132 
133 LM_NAMESPACE_END
134 
135 #endif // LIB_LIGHTMETRICA_BPT_FULL_PATH_H
LM_PUBLIC_API Math::Float PathSelectionProbability() const
Definition: bpt.fullpath.cpp:476
Math::PDFEval pdfDL[2]
PDF evaluation for y_{s-1} (light sub-path)
Definition: bpt.fullpath.h:128
LM_PUBLIC_API const BPTPathVertex * FullPathVertex(int i) const
Definition: bpt.fullpath.cpp:481
const BPTSubpath & lightSubpath
Light sub-path.
Definition: bpt.fullpath.h:126
LM_PUBLIC_API void DebugPrint() const
Definition: bpt.fullpath.cpp:498
LM_PUBLIC_API Math::PDFEval FullPathVertexDirectionPDF(int i, TransportDirection transportDir) const
Definition: bpt.fullpath.cpp:489
const BPTSubpath & eyeSubpath
Eye sub-path.
Definition: bpt.fullpath.h:127
Definition: scene.h:47
Math::PDFEval pdfDE[2]
PDF evaluation for z_{t-1} (eye sub-path)
Definition: bpt.fullpath.h:129
int s
of vertices in light sub-path
Definition: bpt.fullpath.h:124
Definition: bpt.subpath.h:54
LM_PUBLIC_API BPTFullPath(int s, int t, const BPTSubpath &lightSubpath, const BPTSubpath &eyeSubpath)
Definition: bpt.fullpath.cpp:35
LM_PUBLIC_API Math::Float EvaluateFullpathPDFRatio(int i) const
Definition: bpt.fullpath.cpp:369
Definition: bpt.subpath.h:117
LM_PUBLIC_API bool FullpathPDFIsZero(int i) const
Definition: bpt.fullpath.cpp:437
LM_PUBLIC_API Math::Float EvaluateFullpathPDF(int i) const
Definition: bpt.fullpath.cpp:297
Definition: bpt.fullpath.h:38
int t
of vertices in eye sub-path
Definition: bpt.fullpath.h:125
LM_PUBLIC_API Math::Vec3 EvaluateUnweightContribution(const Scene &scene, Math::Vec2 &rasterPosition) const
Definition: bpt.fullpath.cpp:168