Memory-efficient photon representation for use with PointKDTree. More...
#include <mitsuba/render/photon.h>
Public Member Functions | |
Photon () | |
Dummy constructor. More... | |
Photon (const Point &pos, const Normal &normal, const Vector &dir, const Spectrum &power, uint16_t depth) | |
Construct from a photon interaction. More... | |
Photon (Stream *stream) | |
Unserialize from a binary data stream. More... | |
int | getDepth () const |
Return the depth (in # of interactions) More... | |
Vector | getDirection () const |
Normal | getNormal () const |
Spectrum | getPower () const |
Convert the photon power from RGBE to floating point. More... | |
void | serialize (Stream *stream) const |
Serialize to a binary data stream. More... | |
std::string | toString () const |
Return a string representation (for debugging) More... | |
Public Member Functions inherited from mitsuba::SimpleKDNode< Point, PhotonData > | |
SimpleKDNode () | |
Initialize a KD-tree node. More... | |
SimpleKDNode (const DataRecord &data) | |
Initialize a KD-tree node with the given data record. More... | |
IndexType | getRightIndex (IndexType self) const |
Given the current node's index, return the index of the right child. More... | |
void | setRightIndex (IndexType self, IndexType value) |
Given the current node's index, set the right child index. More... | |
IndexType | getLeftIndex (IndexType self) const |
Given the current node's index, return the index of the left child. More... | |
void | setLeftIndex (IndexType self, IndexType value) |
Given the current node's index, set the left child index. More... | |
bool | isLeaf () const |
Check whether this is a leaf node. More... | |
void | setLeaf (bool value) |
Specify whether this is a leaf node. More... | |
uint16_t | getAxis () const |
Return the split axis associated with this node. More... | |
void | setAxis (uint8_t axis) |
Set the split flags associated with this node. More... | |
const PointType & | getPosition () const |
Return the position associated with this node. More... | |
void | setPosition (const PointType &value) |
Set the position associated with this node. More... | |
DataRecord & | getData () |
Return the data record associated with this node. More... | |
const DataRecord & | getData () const |
Return the data record associated with this node (const version) More... | |
void | setData (const DataRecord &val) |
Set the data record associated with this node. More... | |
Static Protected Member Functions | |
static bool | createPrecompTables () |
Initialize the precomputed lookup tables. More... | |
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 |
Friends | |
class | PhotonMap |
Additional Inherited Members | |
Public Types inherited from mitsuba::SimpleKDNode< Point, PhotonData > | |
enum | |
typedef Point | PointType |
typedef PhotonData | DataRecord |
typedef uint32_t | IndexType |
typedef PointType::Scalar | Scalar |
Public Attributes inherited from mitsuba::SimpleKDNode< Point, PhotonData > | |
PointType | position |
IndexType | right |
DataRecord | data |
uint8_t | flags |
Static Public Attributes inherited from mitsuba::SimpleKDNode< Point, PhotonData > | |
static const bool | leftBalancedLayout |
Memory-efficient photon representation for use with PointKDTree.
|
inline |
Dummy constructor.
mitsuba::Photon::Photon | ( | const Point & | pos, |
const Normal & | normal, | ||
const Vector & | dir, | ||
const Spectrum & | power, | ||
uint16_t | depth | ||
) |
Construct from a photon interaction.
mitsuba::Photon::Photon | ( | Stream * | stream | ) |
Unserialize from a binary data stream.
|
staticprotected |
Initialize the precomputed lookup tables.
|
inline |
Return the depth (in # of interactions)
|
inline |
Convert the photon direction from quantized spherical coordinates to a floating point vector value. Precomputation idea based on Jensen's implementation.
|
inline |
Convert the normal direction from quantized spherical coordinates to a floating point vector value.
|
inline |
Convert the photon power from RGBE to floating point.
void mitsuba::Photon::serialize | ( | Stream * | stream | ) | const |
Serialize to a binary data stream.
std::string mitsuba::Photon::toString | ( | ) | const |
Return a string representation (for debugging)
|
friend |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |