19 #include <nori/integrator.h>
20 #include <nori/sampler.h>
21 #include <nori/emitter.h>
22 #include <nori/bsdf.h>
23 #include <nori/scene.h>
24 #include <nori/photon.h>
35 m_photonCount = props.
getInteger(
"photonCount", 1000000);
36 m_photonRadius = props.
getFloat(
"photonRadius", 0.0f );
40 cout <<
"Gathering " << m_photonCount <<
" photons .. ";
48 m_photonMap = std::unique_ptr<PhotonMap>(
new PhotonMap());
49 m_photonMap->reserve(m_photonCount);
52 if (m_photonRadius == 0)
93 virtual std::string
toString()
const override {
96 " photonCount = %i,\n"
97 " photonRadius = %f\n"
109 float m_photonRadius;
110 std::unique_ptr<PhotonMap> m_photonMap;
Abstract integrator (i.e. a rendering technique)
static NoriObject * createInstance(const std::string &name, const PropertyList &propList)
Construct an instance from the class of the given name.
virtual std::string toString() const override
Return a brief string summary of the instance (for debugging purposes)
PointKDTree< Photon > PhotonMap
Photon map data structure.
virtual Color3f Li(const Scene *scene, Sampler *sampler, const Ray3f &_ray) const override
Sample the incident radiance along a ray.
virtual void preprocess(const Scene *scene) override
Perform an (optional) preprocess step.
Generic multi-dimensional kd-tree data structure for point data.
This is an associative container used to supply the constructors of NoriObject subclasses with parame...
float getFloat(const std::string &name) const
Get a float property, and throw an exception if it does not exist.
int getInteger(const std::string &name) const
Get an integer property, and throw an exception if it does not exist.
Abstract sample generator.
Main scene data structure.
const BoundingBox3f & getBoundingBox() const
Return an axis-aligned box that bounds the scene.
Represents a linear RGB color value.
VectorType getExtents() const
Calculate the bounding box extents.