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

Diffusive surface emitter. More...

#include <DiffuseSurfaceEmitter.h>

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

Public Member Functions

 DiffuseSurfaceEmitter (const Primitive *surface, const std::shared_ptr< TTexture< math::Spectrum > > &emittedEnergy, EmitterFeatureSet featureSet=defaultFeatureSet)
 
void evalEmittedEnergy (const SurfaceHit &Xe, math::Spectrum *out_energy) const override
 Evaluate emitted energy from a point on the surface.
 
void genDirectSample (DirectEnergySampleQuery &query, SampleFlow &sampleFlow, HitProbe &probe) const override
 Sample direct lighting for a target position.
 
void calcDirectPdf (DirectEnergyPdfQuery &query) const override
 Calculate the PDF of direct lighting for a target position.
 
void emitRay (EnergyEmissionSampleQuery &query, SampleFlow &sampleFlow, HitProbe &probe) const override
 Emit a ray that carries some amount of energy from this emitter.
 
real calcRadiantFluxApprox () const override
 
const PrimitivegetSurface () const
 
const TTexture< math::Spectrum > & getEmittedEnergy () const
 
- Public Member Functions inherited from ph::DiffuseSurfaceEmitterBase
 DiffuseSurfaceEmitterBase (EmitterFeatureSet featureSet=defaultFeatureSet)
 
- 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 ()
 
EmitterFeatureSet getFeatureSet () const
 

Additional Inherited Members

- Static Public Attributes inherited from ph::Emitter
static constexpr auto defaultFeatureSet = EmitterFeatureSet(EEmitterFeatureSet::Default)
 
- Protected Member Functions inherited from ph::DiffuseSurfaceEmitterBase
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
 
- Protected Attributes inherited from ph::SurfaceEmitter
bool m_isBackFaceEmission
 

Detailed Description

Diffusive surface emitter.

Constructor & Destructor Documentation

◆ DiffuseSurfaceEmitter()

ph::DiffuseSurfaceEmitter::DiffuseSurfaceEmitter ( const Primitive * surface,
const std::shared_ptr< TTexture< math::Spectrum > > & emittedEnergy,
EmitterFeatureSet featureSet = defaultFeatureSet )

Member Function Documentation

◆ calcDirectPdf()

void ph::DiffuseSurfaceEmitter::calcDirectPdf ( DirectEnergyPdfQuery & query) const
overridevirtual

Calculate the PDF of direct lighting for a target position.

Note

Implements ph::DiffuseSurfaceEmitterBase.

◆ calcRadiantFluxApprox()

real ph::DiffuseSurfaceEmitter::calcRadiantFluxApprox ( ) const
overridevirtual

Reimplemented from ph::Emitter.

◆ emitRay()

void ph::DiffuseSurfaceEmitter::emitRay ( EnergyEmissionSampleQuery & query,
SampleFlow & sampleFlow,
HitProbe & probe ) const
overridevirtual

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

Note

Implements ph::DiffuseSurfaceEmitterBase.

◆ evalEmittedEnergy()

void ph::DiffuseSurfaceEmitter::evalEmittedEnergy ( const SurfaceHit & Xe,
math::Spectrum * out_energy ) const
overridevirtual

Evaluate emitted energy from a point on the surface.

Parameters
XeThe point that emits energy.

Implements ph::DiffuseSurfaceEmitterBase.

◆ genDirectSample()

void ph::DiffuseSurfaceEmitter::genDirectSample ( DirectEnergySampleQuery & query,
SampleFlow & sampleFlow,
HitProbe & probe ) const
overridevirtual

Sample direct lighting for a target position.

Note

Implements ph::DiffuseSurfaceEmitterBase.

◆ getEmittedEnergy()

const TTexture< math::Spectrum > & ph::DiffuseSurfaceEmitter::getEmittedEnergy ( ) const
inline

◆ getSurface()

const Primitive & ph::DiffuseSurfaceEmitter::getSurface ( ) const
inline

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