Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
common.h
Go to the documentation of this file.
1 /*
2  This file is part of Mitsuba, a physically based rendering system.
3 
4  Copyright (c) 2007-2014 by Wenzel Jakob and others.
5 
6  Mitsuba is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License Version 3
8  as published by the Free Software Foundation.
9 
10  Mitsuba is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #pragma once
20 #if !defined(__MITSUBA_BIDIR_COMMON_H_)
21 #define __MITSUBA_BIDIR_COMMON_H_
22 
23 #include <mitsuba/render/scene.h>
24 
26 
27 /// Activates extra debugging checks in the bidirectional layer
28 #define MTS_BD_DEBUG 1
29 
30 #if MTS_BD_DEBUG == 1
31 #define BDAssert(expr) SAssert(expr)
32 #else
33 #define BDAssert(expr)
34 #endif
35 
36 #define MAX(a, b) ((a) > (b) ? (a) : (b))
37 
38 /**
39  * \brief Data record associated with path endpoints (aka supernodes)
40  * in the path-space framework
41  *
42  * This record stores the desired time value when starting a new path.
43  * For sensor subpaths, it optionally specifies the desired pixel
44  * position of the path.
45  *
46  * \ingroup libbidir
47  */
49  /// Time value associated with the path
51 
52  /// Create a new endpoint record for a given time value
53  inline EndpointRecord(Float time)
54  : time(time) { }
55 
56  /// Create a new endpoint record for a given time value
57  inline EndpointRecord(Float time,
58  const Point2 &uv) : time(time) { }
59 
60  /// Return a human-readable description
61  std::string toString() const;
62 };
63 
64 /* Forward declarations */
65 struct PathVertex;
66 struct PathEdge;
67 struct Path;
68 struct PathSeed;
69 struct SplatList;
70 struct MutationRecord;
71 class MemoryPool;
72 class SeedWorkUnit;
73 class PathSampler;
74 class Mutator;
75 class PathSolver;
76 class SpecularManifold;
77 
79 
80 #endif /* __MITSUBA_BIDIR_COMMON_H_ */
#define MTS_NAMESPACE_BEGIN
Definition: platform.h:137
EndpointRecord(Float time)
Create a new endpoint record for a given time value.
Definition: common.h:53
Definition: fwd.h:99
EndpointRecord(Float time, const Point2 &uv)
Create a new endpoint record for a given time value.
Definition: common.h:57
Data record associated with path endpoints (aka supernodes) in the path-space framework.
Definition: common.h:48
#define MTS_NAMESPACE_END
Definition: platform.h:138
Float time
Time value associated with the path.
Definition: common.h:50