#include <photon.h>
Public Member Functions | |
| Photon () | |
| void | SetPosition (const sheep::Point3 &position) |
| sheep::Point3 | GetPosition () const |
| void | SetPower (const Color3 &power) |
| void | ScalePower (sheep::Real scale) |
| Color3 | GetPower () const |
| void | SetIncidentDirection (const sheep::Vector3 &direction) |
| sheep::Vector3 | GetIncidentDirection () const |
| void | SetSplittingPlaneAxis (int axis) |
| int | GetSplittingPlaneAxis () const |
| bool | HasPrecomputedRadiance () const |
| Returns true if this photon carries a precomputed radiance. | |
| void | SetPrecomputedRadiance (const Color3 &radiance) |
| Radiance is expressed in W.m^-2.sr^-1. | |
| Color3 | GetPrecomputedRadiance () const |
| void | SetSurfaceNormal (const sheep::Vector3 &normal) |
| sheep::Vector3 | GetSurfaceNormal () const |
| void | WriteToStream (sheep::BinaryStream &os) const |
| void | ReadFromStream (sheep::BinaryStream &is) |
Public Attributes | |
| sheep::float32 | m_position [3] |
| Position (12 bytes). | |
Private Attributes | |
| sheep::float32 | m_power [3] |
| Full precision power (12 bytes). Expressed in W. | |
| sheep::uint8 | m_qphi |
| sheep::uint8 | m_qtheta |
| Compressed incident direction (2 bytes). Expressed in world space (away from the surface). | |
| sheep::float32 | m_radiance [3] |
| Full precision precomputed radiance (12 bytes). Expressed in W.m^-2.sr^-1. | |
| sheep::uint8 | m_qnormal |
| Normal of the surface at the photon position (1 byte). | |
| sheep::uint16 | m_flags |
| sheep::uint8 | m_padding [3] |
Definition at line 42 of file photon.h.
|
|
|
|
|
Returns the photon incident direction. The returned direction is a unit-length vector going away from the surface carrying the photon, and is expressed in world space. Definition at line 203 of file photon.h. Referenced by toxic::PhotonMap::ApproximateRadiance(), toxic::PhotonMap::BuildPhotonDirectionHistogram(), and toxic::PhotonMap::ComputeRadiance(). |
|
|
Definition at line 154 of file photon.h. Referenced by toxic::PhotonMap::PrecomputeRadiances(). |
|
|
Definition at line 189 of file photon.h. Referenced by toxic::PhotonMap::ApproximateRadiance(), toxic::PhotonMap::BuildPhotonDirectionHistogram(), and toxic::PhotonMap::ComputeRadiance(). |
|
|
Definition at line 242 of file photon.h. Referenced by toxic::PhotonMap::GetPrecomputedRadiance(). |
|
|
Definition at line 215 of file photon.h. Referenced by toxic::PhotonMap::locate_nearest_photon_with_irradiance(), and toxic::PhotonMap::locate_photons(). |
|
|
Returns the surface normal at the photon position. The returned normal is unit-length and is expressed in world space. Definition at line 258 of file photon.h. Referenced by toxic::PhotonMap::ApproximateRadiance(), toxic::PhotonMap::BuildPhotonDirectionHistogram(), toxic::PhotonMap::ComputeRadiance(), toxic::PhotonMap::locate_nearest_photon_with_irradiance(), and toxic::PhotonMap::PrecomputeRadiances(). |
|
|
Returns true if this photon carries a precomputed radiance.
Definition at line 223 of file photon.h. Referenced by toxic::PhotonMap::locate_nearest_photon_with_irradiance(). |
|
|
Definition at line 312 of file photon.h. Referenced by toxic::PhotonMap::CreateFromFile(). |
|
|
|
|
|
Sets the photon incident direction. The direction vector must be unit-length, must go away from the surface carrying the photon and must be expressed in world space. Definition at line 198 of file photon.h. Referenced by toxic::PhotonMap::StorePhoton(). |
|
|
Definition at line 147 of file photon.h. Referenced by toxic::PhotonMap::StorePhoton(). |
|
|
Definition at line 159 of file photon.h. Referenced by toxic::PhotonMap::StorePhoton(). |
|
|
Radiance is expressed in W.m^-2.sr^-1.
Definition at line 229 of file photon.h. Referenced by toxic::PhotonMap::PrecomputeRadiances(). |
|
|
Definition at line 208 of file photon.h. Referenced by toxic::PhotonMap::balance_segment(). |
|
|
Sets the surface normal at the photon position. The normal must be unit-length and must be expressed in world space. Definition at line 253 of file photon.h. Referenced by toxic::PhotonMap::StorePhoton(). |
|
|
|
|
|
Various flags and data (2 bytes). Bits 1-0: splitting plane axis (for kd-tree construction). Bit 2: 1 if the photon carries an irradiance estimate, 0 otherwise. Do not change the size of this member unless you apply the change everywhere. |
|
|
|
|
|
Position (12 bytes).
Definition at line 44 of file photon.h. Referenced by toxic::PhotonMap::balance_segment(), toxic::PhotonMap::locate_nearest_photon_with_irradiance(), toxic::PhotonMap::locate_photons(), and toxic::PhotonMap::median_split(). |
|
|
Full precision power (12 bytes). Expressed in W.
|
|
|
Normal of the surface at the photon position (1 byte).
|
|
|
|
|
|
Compressed incident direction (2 bytes). Expressed in world space (away from the surface).
|
|
|
Full precision precomputed radiance (12 bytes). Expressed in W.m^-2.sr^-1.
|
1.3.6