Ray Tracer  2020
LightSource.h
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef LIGHT_SOURCE_H_INCLUDED
4 #define LIGTH_SOURCE_H_INCLUDED
5 
6 #include "Colour.h"
7 #include "Ray.h"
8 
23 class LightSource {
24 
25 public:
26 
36  virtual Colour getIlluminationAt(const Point& point) const = 0;
37 
38 
57  virtual double getDistanceToLight(const Point& point) const = 0;
58 
70  virtual Direction getLightDirection(const Point& point) const = 0;
71 
72 
73 protected:
74 
79  LightSource(const Colour& colour);
80 
85  LightSource(const LightSource& lightSource);
86 
88  virtual ~LightSource();
89 
95  LightSource& operator=(const LightSource& lightSource);
96 
98 };
99 
100 #endif // LIGHT_SOURCE_H_INCLUDED
Colour class header file.
Ray class header file.
Class to store colour information.
Definition: Colour.h:25
Class for Direction Vectors.
Definition: Direction.h:22
Abstract base class for LightSources.
Definition: LightSource.h:23
virtual Colour getIlluminationAt(const Point &point) const =0
Determine how much light reaches a Point from this LightSource.
virtual double getDistanceToLight(const Point &point) const =0
Determine how far away the light source is from a given Point.
LightSource & operator=(const LightSource &lightSource)
LightSource assignment operator.
Definition: LightSource.cpp:15
virtual ~LightSource()
LightSource destructor.
Definition: LightSource.cpp:11
virtual Direction getLightDirection(const Point &point) const =0
Direction from light source to a point.
Colour colour_
The Colour of this LightSource's illumination.
Definition: LightSource.h:97
LightSource(const Colour &colour)
LightSource constructor.
Definition: LightSource.cpp:3
Class for Point Vectors.
Definition: Point.h:22