Nori  23
PhotonData Struct Reference

Stores the direction and power of a photon as "payload" of a generic kd-tree node (see kdtree.h) More...

#include <photon.h>

Public Member Functions

 PhotonData ()
 Dummy constructor.
 
 PhotonData (const Vector3f &dir, const Color3f &power)
 Initialize a photon with the specified direction of propagation and power.
 
Vector3f getDirection () const
 
Color3f getPower () const
 Convert the photon power from RGBE to floating point.
 

Public Attributes

uint8_t rgbe [4]
 Photon power stored in Greg Ward's RGBE format.
 
uint8_t theta
 Discretized photon direction (theta component)
 
uint8_t phi
 Discretized photon direction (phi component)
 

Static Protected Member Functions

static bool initialize ()
 Initialize the precomputed lookup tables.
 

Static Protected Attributes

Precomputed lookup tables
static float m_cosTheta [256]
 
static float m_sinTheta [256]
 
static float m_cosPhi [256]
 
static float m_sinPhi [256]
 
static float m_expTable [256]
 
static bool m_precompTableReady = PhotonData::initialize()
 

Detailed Description

Stores the direction and power of a photon as "payload" of a generic kd-tree node (see kdtree.h)

Definition at line 28 of file photon.h.

Member Function Documentation

◆ getDirection()

Vector3f PhotonData::getDirection ( ) const
inline

Convert the stored photon direction from quantized spherical coordinates to a Vector3f value. Uses precomputation similar to that of Henrik Wann Jensen's implementation.

Definition at line 44 of file photon.h.


The documentation for this struct was generated from the following files: