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

Models energy coming from background. More...

#include <LatLongEnvEmitter.h>

Inheritance diagram for ph::LatLongEnvEmitter:
ph::SurfaceEmitter ph::Emitter

Public Types

using RadianceTexture = std::shared_ptr<TTexture<math::Spectrum>>
 

Public Member Functions

 LatLongEnvEmitter (const Primitive *envSurface, const RadianceTexture &radiance, const math::Vector2S &resolution, 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
 
void setFrontFaceEmit () override
 
void setBackFaceEmit () override
 
- Public Member Functions inherited from ph::SurfaceEmitter
 SurfaceEmitter (EmitterFeatureSet featureSet=defaultFeatureSet)
 
- 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::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

Models energy coming from background.

A latitude-longitude environment emitter represents energy coming from effectively infinite distances from the world geometries. This emitter takes only radiance functions in latitude-longitude format, i.e., with textures parameterized by normalized spherical coordinates (with north pole being 1).

Member Typedef Documentation

◆ RadianceTexture

Constructor & Destructor Documentation

◆ LatLongEnvEmitter()

ph::LatLongEnvEmitter::LatLongEnvEmitter ( const Primitive * envSurface,
const RadianceTexture & radiance,
const math::Vector2S & resolution,
EmitterFeatureSet featureSet = defaultFeatureSet )

Member Function Documentation

◆ calcDirectPdf()

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

Calculate the PDF of direct lighting for a target position.

Note

Implements ph::SurfaceEmitter.

◆ calcRadiantFluxApprox()

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

Reimplemented from ph::Emitter.

◆ emitRay()

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

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

Note

Implements ph::SurfaceEmitter.

◆ evalEmittedEnergy()

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

◆ genDirectSample()

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

Sample direct lighting for a target position.

Note

Implements ph::SurfaceEmitter.

◆ setBackFaceEmit()

void ph::LatLongEnvEmitter::setBackFaceEmit ( )
overridevirtual

Reimplemented from ph::SurfaceEmitter.

◆ setFrontFaceEmit()

void ph::LatLongEnvEmitter::setFrontFaceEmit ( )
overridevirtual

Reimplemented from ph::SurfaceEmitter.


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