Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::DiffuseSurfaceEmitterBase Class Referenceabstract

Base for diffusive surface emitters. More...

#include <DiffuseSurfaceEmitterBase.h>

Inheritance diagram for ph::DiffuseSurfaceEmitterBase:
ph::SurfaceEmitter ph::Emitter ph::DiffuseSurfaceEmitter ph::GroupedDiffuseSurfaceEmitter

Public Member Functions

 DiffuseSurfaceEmitterBase (EmitterFeatureSet featureSet=defaultFeatureSet)
 
void evalEmittedEnergy (const SurfaceHit &Xe, math::Spectrum *out_energy) const override=0
 Evaluate emitted energy from a point on the surface.
 
void genDirectSample (DirectEnergySampleQuery &query, SampleFlow &sampleFlow, HitProbe &probe) const override=0
 Sample direct lighting for a target position.
 
void calcDirectPdf (DirectEnergyPdfQuery &query) const override=0
 Calculate the PDF of direct lighting for a target position.
 
void emitRay (EnergyEmissionSampleQuery &query, SampleFlow &sampleFlow, HitProbe &probe) const override=0
 Emit a ray that carries some amount of energy from this emitter.
 
- Public Member Functions inherited from ph::SurfaceEmitter
 SurfaceEmitter (EmitterFeatureSet featureSet=defaultFeatureSet)
 
virtual void setFrontFaceEmit ()
 
virtual void setBackFaceEmit ()
 
- Public Member Functions inherited from ph::Emitter
 Emitter (EmitterFeatureSet featureSet=defaultFeatureSet)
 
virtual ~Emitter ()
 
virtual real calcRadiantFluxApprox () const
 
EmitterFeatureSet getFeatureSet () const
 

Protected Member Functions

void evalEnergyFromSurface (const TTexture< math::Spectrum > &energy, const SurfaceHit &Xe, math::Spectrum *out_energy) const
 
void genDirectSampleFromSurface (const Primitive &surface, const TTexture< math::Spectrum > &energy, DirectEnergySampleQuery &query, SampleFlow &sampleFlow, HitProbe &probe) const
 
void emitRayFromSurface (const Primitive &surface, const TTexture< math::Spectrum > &energy, EnergyEmissionSampleQuery &query, SampleFlow &sampleFlow, HitProbe &probe) const
 
- Protected Member Functions inherited from ph::SurfaceEmitter
bool canEmit (const math::Vector3R &emitDir, const math::Vector3R &N) const
 
void calcDirectPdfWForSrcPrimitive (DirectEnergyPdfQuery &query, const lta::PDF &pickPdf=lta::PDF::D(1), const lta::PDF &emitPosUvwPdf={}) const
 

Additional Inherited Members

- Static Public Attributes inherited from ph::Emitter
static constexpr auto defaultFeatureSet = EmitterFeatureSet(EEmitterFeatureSet::Default)
 
- Protected Attributes inherited from ph::SurfaceEmitter
bool m_isBackFaceEmission
 

Detailed Description

Base for diffusive surface emitters.

Constructor & Destructor Documentation

◆ DiffuseSurfaceEmitterBase()

ph::DiffuseSurfaceEmitterBase::DiffuseSurfaceEmitterBase ( EmitterFeatureSet featureSet = defaultFeatureSet)
explicit

Member Function Documentation

◆ calcDirectPdf()

void ph::DiffuseSurfaceEmitterBase::calcDirectPdf ( DirectEnergyPdfQuery & query) const
overridepure virtual

Calculate the PDF of direct lighting for a target position.

Note

Implements ph::SurfaceEmitter.

Implemented in ph::DiffuseSurfaceEmitter, and ph::GroupedDiffuseSurfaceEmitter.

◆ emitRay()

void ph::DiffuseSurfaceEmitterBase::emitRay ( EnergyEmissionSampleQuery & query,
SampleFlow & sampleFlow,
HitProbe & probe ) const
overridepure virtual

Emit a ray that carries some amount of energy from this emitter.

Note

Implements ph::SurfaceEmitter.

Implemented in ph::DiffuseSurfaceEmitter, and ph::GroupedDiffuseSurfaceEmitter.

◆ emitRayFromSurface()

void ph::DiffuseSurfaceEmitterBase::emitRayFromSurface ( const Primitive & surface,
const TTexture< math::Spectrum > & energy,
EnergyEmissionSampleQuery & query,
SampleFlow & sampleFlow,
HitProbe & probe ) const
protected
Note

◆ evalEmittedEnergy()

void ph::DiffuseSurfaceEmitterBase::evalEmittedEnergy ( const SurfaceHit & Xe,
math::Spectrum * out_energy ) const
overridepure virtual

Evaluate emitted energy from a point on the surface.

Parameters
XeThe point that emits energy.

Implements ph::SurfaceEmitter.

Implemented in ph::DiffuseSurfaceEmitter, and ph::GroupedDiffuseSurfaceEmitter.

◆ evalEnergyFromSurface()

void ph::DiffuseSurfaceEmitterBase::evalEnergyFromSurface ( const TTexture< math::Spectrum > & energy,
const SurfaceHit & Xe,
math::Spectrum * out_energy ) const
protected

◆ genDirectSample()

void ph::DiffuseSurfaceEmitterBase::genDirectSample ( DirectEnergySampleQuery & query,
SampleFlow & sampleFlow,
HitProbe & probe ) const
overridepure virtual

Sample direct lighting for a target position.

Note

Implements ph::SurfaceEmitter.

Implemented in ph::DiffuseSurfaceEmitter, and ph::GroupedDiffuseSurfaceEmitter.

◆ genDirectSampleFromSurface()

void ph::DiffuseSurfaceEmitterBase::genDirectSampleFromSurface ( const Primitive & surface,
const TTexture< math::Spectrum > & energy,
DirectEnergySampleQuery & query,
SampleFlow & sampleFlow,
HitProbe & probe ) const
protected
Note

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