Ray Tracer Common Project
Image rendering program based on the ray tracing technique.
omnilight.hpp
1 
15 #pragma once
16 
17 #include "light.hpp"
18 
19 namespace rt{
20 
26 class OmniLight : public Light{
27 public:
31  OmniLight(const vector & pos, const rt::color & color, double e = 1.0, Light::Type type = Light::Quadratic);
32 
37  virtual double distance(const vector &from) const;
38 
42  virtual const rt::photon & photon(const vector & from) const;
43 
44 protected:
45  rt::photon _p;
46 };
47 
48 }
Definition: bitmap.cpp:4
RGBA color representation.
Definition: color.hpp:31
Light source class representation.
Definition: light.hpp:28
virtual double distance(const vector &from) const
Global distance between the light and a position.
Definition: omnilight.cpp:9
3D vector
Definition: vector.hpp:28
OmniLight(const vector &pos, const rt::color &color, double e=1.0, Light::Type type=Light::Quadratic)
Contstruct a new omnidirectional light from its position and color.
Definition: omnilight.cpp:5
Light photon class.
Definition: photon.hpp:28
virtual const rt::photon & photon(const vector &from) const
Get a photon from a global space location.
Definition: omnilight.cpp:13
Omnidirectional light source.
Definition: omnilight.hpp:26