#ifndef _utl_Photon_h_ #define _utl_Photon_h_ // $Id$ #include #include #include namespace utl { class Photon { public: Photon() : fWeight(0), fSource(0), fWavelength(0) { } Photon(const utl::Point& p, const utl::Vector& n, const double lambda, const double weight, const int source = 0) : fWeight(weight), fSource(source), fPosition(p), fDirection(n), fWavelength(lambda) { } /// weight assigned to the photon double GetWeight() const { return fWeight; } /// source of the photons. Should use Eye::LightSource enum types int GetSource() const { return fSource; } const utl::Point& GetPosition() const { return fPosition; } const utl::Vector& GetDirection() const { return fDirection; } double GetWavelength() const { return fWavelength; } utl::TimeInterval GetTime() const { return fTime; } /// source of the photons. Should use Eye::LightSource enum types void SetWeight(const double w) { fWeight = w; } void SetSource(const int source ) { fSource = source; } void SetPosition(const utl::Point& p) { fPosition = p; } void SetDirection(const utl::Vector& v) { fDirection = v; } void SetWavelength(const double wl) { fWavelength = wl; } void SetTime(const utl::TimeInterval& t) { fTime = t; } private: double fWeight; int fSource; utl::Point fPosition; utl::Vector fDirection; double fWavelength; utl::TimeInterval fTime; }; } #endif