19 #if !defined(__NORI_PHOTON_H)
20 #define __NORI_PHOTON_H
22 #include <nori/kdtree.h>
23 #include <nori/color.h>
61 static float m_cosTheta[256];
62 static float m_sinTheta[256];
63 static float m_cosPhi[256];
64 static float m_sinPhi[256];
65 static float m_expTable[256];
66 static bool m_precompTableReady;
Represents a linear RGB color value.
Simple kd-tree node data structure for use with PointKDTree.
Stores the direction and power of a photon as "payload" of a generic kd-tree node (see kdtree....
uint8_t rgbe[4]
Photon power stored in Greg Ward's RGBE format.
Vector3f getDirection() const
PhotonData()
Dummy constructor.
uint8_t theta
Discretized photon direction (theta component)
Color3f getPower() const
Convert the photon power from RGBE to floating point.
static bool initialize()
Initialize the precomputed lookup tables.
uint8_t phi
Discretized photon direction (phi component)
A Photon which also doubles as a kd-tree node for use with PointKDTree.
Photon()
Dummy constructor.
Photon(const Point3f &pos, const Vector3f &dir, const Color3f &power)
Construct from a photon interaction.