Nori  24
AreaEmitter Class Reference
Inheritance diagram for AreaEmitter:
Collaboration diagram for AreaEmitter:

Public Member Functions

 AreaEmitter (const PropertyList &props)
 
virtual std::string toString () const override
 Return a brief string summary of the instance (for debugging purposes)
 
virtual Color3f eval (const EmitterQueryRecord &lRec) const override
 Evaluate the emitter. More...
 
virtual Color3f sample (EmitterQueryRecord &lRec, const Point2f &sample) const override
 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 float pdf (const EmitterQueryRecord &lRec) const override
 Compute the probability of sampling lRec.p. More...
 
virtual Color3f samplePhoton (Ray3f &ray, const Point2f &sample1, const Point2f &sample2) const override
 Sample a photon.
 
- Public Member Functions inherited from Emitter
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...
 
void setIdName (const std::string &name)
 Allow to assign a name to the object.
 
const std::string & getIdName () const
 

Protected Attributes

Color3f m_radiance
 
- Protected Attributes inherited from Emitter
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

Definition at line 25 of file arealight.cpp.

Member Function Documentation

◆ eval()

virtual Color3f AreaEmitter::eval ( const EmitterQueryRecord lRec) const
inlineoverridevirtual

Evaluate the emitter.

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

Implements Emitter.

Definition at line 39 of file arealight.cpp.

◆ pdf()

virtual float AreaEmitter::pdf ( const EmitterQueryRecord lRec) const
inlineoverridevirtual

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

Implements Emitter.

Definition at line 53 of file arealight.cpp.

◆ sample()

virtual Color3f AreaEmitter::sample ( EmitterQueryRecord lRec,
const Point2f sample 
) const
inlineoverridevirtual

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.

Implements Emitter.

Definition at line 46 of file arealight.cpp.


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