19 #include <nori/emitter.h>
20 #include <nori/warp.h>
21 #include <nori/shape.h>
28 m_radiance = props.
getColor(
"radiance");
31 virtual std::string
toString()
const override {
41 throw NoriException(
"There is no shape attached to this Area light!");
48 throw NoriException(
"There is no shape attached to this Area light!");
55 throw NoriException(
"There is no shape attached to this Area light!");
virtual float pdf(const EmitterQueryRecord &lRec) const override
Compute the probability of sampling lRec.p.
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 pro...
virtual Color3f samplePhoton(Ray3f &ray, const Point2f &sample1, const Point2f &sample2) const override
Sample a photon.
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.
Superclass of all emitters.
Shape * m_shape
Pointer to the shape if the emitter is attached to a shape.
Simple exception class, which stores a human-readable error description.
This is an associative container used to supply the constructors of NoriObject subclasses with parame...
Color3f getColor(const std::string &name) const
Get a color property, and throw an exception if it does not exist.
Represents a linear RGB color value.
std::string toString() const
Return a human-readable string summary.
Data record for conveniently querying and sampling the direct illumination technique implemented by a...