1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Photon Mapping

Discussion in 'C++' started by ffxfreak, Jan 31, 2008.

  1. ffxfreak

    ffxfreak New Member

    Joined:
    Jan 31, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi, I'm pretty much new to C++ as kind of feel as if I've been thrown to the wolves with this Photon Mapping assignment. Below is my PhotonMap class so far. My question is, any tips on how to update it to hold a collection of photons?
    Code:
    class PhotonMap {
       private:
          Scene &scene;
       public:
          // Constructor initializing the reference to the Scene.
          PhotonMap (Scene &sc) : scene(sc) {}
          // compute brightness based on placed photons
          Color illumination (const Point &spot, const Point &normal,
                              double max_dist, unsigned int num_photons) const;
          // randomly place photons
          void trace_photons (void);
          Scene &get_scene (void) { return scene; }
    };
     

Share This Page