Nori  23
Emitter Class Referenceabstract

Superclass of all emitters. More...

#include <emitter.h>

Inheritance diagram for Emitter:
Collaboration diagram for Emitter:

Public Member Functions

virtual Color3f sample (EmitterQueryRecord &lRec, const Point2f &sample) const =0
 Sample the emitter and return the importance weight (i.e. the value of the Emitter divided by the probability density of the sample with respect to solid angles). More...
 
virtual Color3f eval (const EmitterQueryRecord &lRec) const =0
 Evaluate the emitter. More...
 
virtual float pdf (const EmitterQueryRecord &lRec) const =0
 Compute the probability of sampling lRec.p. More...
 
virtual Color3f samplePhoton (Ray3f &ray, const Point2f &sample1, const Point2f &sample2) const
 Sample a photon.
 
virtual ~Emitter ()
 Virtual destructor.
 
virtual EClassType getClassType () const override
 Return the type of object (i.e. Mesh/Emitter/etc.) provided by this instance.
 
void setShape (Shape *shape)
 Set the shape if the emitter is attached to a shape.
 
- Public Member Functions inherited from NoriObject
virtual ~NoriObject ()
 Virtual destructor.
 
virtual void addChild (NoriObject *child)
 Add a child object to the current instance. More...
 
virtual void setParent (NoriObject *parent)
 Set the parent object. More...
 
virtual void activate ()
 Perform some action associated with the object. More...
 
virtual std::string toString () const =0
 Return a brief string summary of the instance (for debugging purposes)
 
void setIdName (const std::string &name)
 Allow to assign a name to the object.
 
const std::string & getIdName () const
 

Protected Attributes

Shapem_shape = nullptr
 Pointer to the shape if the emitter is attached to a shape.
 
- Protected Attributes inherited from NoriObject
std::string m_idname
 

Additional Inherited Members

- Public Types inherited from NoriObject
enum  EClassType {
  EScene = 0 , EMesh , ETexture , EBSDF ,
  EPhaseFunction , EEmitter , EMedium , ECamera ,
  EIntegrator , ESampler , ETest , EReconstructionFilter ,
  EClassTypeCount
}
 
- Static Public Member Functions inherited from NoriObject
static std::string classTypeName (EClassType type)
 Turn a class type into a human-readable string.
 

Detailed Description

Superclass of all emitters.

Definition at line 64 of file emitter.h.

Member Function Documentation

◆ eval()

virtual Color3f Emitter::eval ( const EmitterQueryRecord lRec) const
pure virtual

Evaluate the emitter.

Parameters
lRecA record with detailed information on the emitter query
Returns
The emitter value, evaluated for each color channel

Implemented in AreaEmitter.

◆ pdf()

virtual float Emitter::pdf ( const EmitterQueryRecord lRec) const
pure virtual

Compute the probability of sampling lRec.p.

This method provides access to the probability density that is realized by the sample() method.

Parameters
lRecA record with detailed information on the emitter query
Returns
A probability/density value

Implemented in AreaEmitter.

◆ sample()

virtual Color3f Emitter::sample ( EmitterQueryRecord lRec,
const Point2f sample 
) const
pure virtual

Sample the emitter and return the importance weight (i.e. the value of the Emitter divided by the probability density of the sample with respect to solid angles).

Parameters
lRecAn emitter query record (only ref is needed)
sampleA uniformly distributed sample on $[0,1]^2$
Returns
The emitter value divided by the probability density of the sample. A zero value means that sampling failed.

Implemented in AreaEmitter.


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