20 #if !defined(__MITSUBA_RENDER_PHOTON_H_)
21 #define __MITSUBA_RENDER_PHOTON_H_
33 #define MTS_PHOTONMAP_LEFT_BALANCED 0
39 #if defined(SINGLE_PRECISION) && SPECTRUM_SAMPLES == 3
58 #if MTS_PHOTONMAP_LEFT_BALANCED == 1
91 m_cosPhi[data.phi] * m_sinTheta[data.theta],
92 m_sinPhi[data.phi] * m_sinTheta[data.theta],
93 m_cosTheta[data.theta]
103 m_cosPhi[data.phiN] * m_sinTheta[data.thetaN],
104 m_sinPhi[data.phiN] * m_sinTheta[data.thetaN],
105 m_cosTheta[data.thetaN]
111 #if defined(SINGLE_PRECISION) && SPECTRUM_SAMPLES == 3
121 void serialize(
Stream *stream)
const;
124 std::string toString()
const;
141 static bool createPrecompTables();
static bool m_precompTableReady
Definition: photon.h:135
uint8_t phiN
Discretized surface normal (phi component)
Definition: photon.h:47
Three-dimensional normal data structure.
Definition: normal.h:39
Left-balanced kd-tree node for use with PointKDTree.
Definition: kdtree.h:128
TVector3< Float > Vector
Definition: fwd.h:113
Spectrum power
Accurate spectral photon power representation.
Definition: photon.h:42
Photon()
Dummy constructor.
Definition: photon.h:66
Internal data record used by Photon.
Definition: photon.h:38
Spectrum getPower() const
Convert the photon power from RGBE to floating point.
Definition: photon.h:110
void fromRGBE(const uint8_t rgbe[4], EConversionIntent intent=EIlluminant)
Convert linear RGBE colors into a plausible spectral power distribution.
Abstract seekable stream class.
Definition: stream.h:58
Implementation of the photon map data structure.
Definition: photonmap.h:34
Memory-efficient photon representation for use with PointKDTree.
Definition: photon.h:57
Normal getNormal() const
Definition: photon.h:101
int getDepth() const
Return the depth (in # of interactions)
Definition: photon.h:80
uint16_t depth
Photon depth (number of preceding interactions)
Definition: photon.h:48
uint8_t phi
Discretized photon direction (phi component)
Definition: photon.h:45
Vector getDirection() const
Definition: photon.h:89
uint8_t thetaN
Discretized surface normal (theta component)
Definition: photon.h:46
Discrete spectral power distribution based on a number of wavelength bins over the 360-830 nm range...
Definition: spectrum.h:663
uint8_t theta
Discretized photon direction (theta component)
Definition: photon.h:44