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

#include <SurfaceEmitter.h>

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

Public Member Functions

 SurfaceEmitter (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.
 
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

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

bool m_isBackFaceEmission
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ SurfaceEmitter()

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

Member Function Documentation

◆ calcDirectPdf()

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

Calculate the PDF of direct lighting for a target position.

Note

Implements ph::Emitter.

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

◆ calcDirectPdfWForSrcPrimitive()

void ph::SurfaceEmitter::calcDirectPdfWForSrcPrimitive ( DirectEnergyPdfQuery & query,
const lta::PDF & pickPdf = lta::PDF::D(1),
const lta::PDF & emitPosUvwPdf = {} ) const
protected

Performs calcDirectPdf() on the source primitive specified by query.inputs. This computes solid angle domain PDF of sampling the surface emitter (as represented by the source primitive).

Note

◆ canEmit()

bool ph::SurfaceEmitter::canEmit ( const math::Vector3R & emitDir,
const math::Vector3R & N ) const
protected
Returns
Can the emitter emit energy in emitDir given surface normal N. This method also considers front/back face emission settings.

◆ emitRay()

void ph::SurfaceEmitter::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::Emitter.

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

◆ evalEmittedEnergy()

void ph::SurfaceEmitter::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::Emitter.

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

◆ genDirectSample()

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

◆ setBackFaceEmit()

void ph::SurfaceEmitter::setBackFaceEmit ( )
virtual

Reimplemented in ph::LatLongEnvEmitter.

◆ setFrontFaceEmit()

void ph::SurfaceEmitter::setFrontFaceEmit ( )
virtual

Reimplemented in ph::LatLongEnvEmitter.

Member Data Documentation

◆ m_isBackFaceEmission

bool ph::SurfaceEmitter::m_isBackFaceEmission
protected

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