|
Ray Tracer
2020
|
Ambient light in a scene. More...
#include <AmbientLightSource.h>
Public Member Functions | |
| AmbientLightSource (const Colour &colour) | |
| AmbientLightSource constructor. More... | |
| AmbientLightSource (const AmbientLightSource &lightSource) | |
| AmbientLightSource copy constructor. More... | |
| ~AmbientLightSource () | |
| AmbientLightSource destructor. More... | |
| AmbientLightSource & | operator= (const AmbientLightSource &lightSource) |
| AmbientLightSource assignment operator. More... | |
| Colour | getIlluminationAt (const Point &point) const |
| Determine how much light reaches a Point from this AmbientLightSource. More... | |
| double | getDistanceToLight (const Point &point) const |
| Distance factor for shadows from this light source. More... | |
| Direction | getLightDirection (const Point &point) const |
| Direction from light source to a point. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from LightSource | |
| LightSource (const Colour &colour) | |
| LightSource constructor. More... | |
| LightSource (const LightSource &lightSource) | |
| LightSource copy constructor. More... | |
| virtual | ~LightSource () |
| LightSource destructor. More... | |
| LightSource & | operator= (const LightSource &lightSource) |
| LightSource assignment operator. More... | |
Protected Attributes inherited from LightSource | |
| Colour | colour_ |
| The Colour of this LightSource's illumination. More... | |
Ambient light in a scene.
An AmbientLightSource represents background illumination in a scene. This is essentially a hack to avoid purely black shadows without having to model indirect lighting, which can be expensive.
| AmbientLightSource::AmbientLightSource | ( | const Colour & | colour | ) |
AmbientLightSource constructor.
| colour | The Colour of light emitted by the AmbientLightSource. |
| AmbientLightSource::AmbientLightSource | ( | const AmbientLightSource & | lightSource | ) |
AmbientLightSource copy constructor.
| lightSource | The AmbientLightSource to copy to this. |
| AmbientLightSource::~AmbientLightSource | ( | ) |
AmbientLightSource destructor.
|
virtual |
Distance factor for shadows from this light source.
Ambient light sources cast no shadows, so this returns -1 as a flag.
Implements LightSource.
Determine how much light reaches a Point from this AmbientLightSource.
For an AmbientLightSource this is just the Colour of the light.
| point | The Point at which light is measured. |
Implements LightSource.
Direction from light source to a point.
Return a Direction pointing from the given point towards the light source. We can return any value for AmbientLightSource, since it will never be used.
| point | The point where the ray is being computed. |
Implements LightSource.
| AmbientLightSource & AmbientLightSource::operator= | ( | const AmbientLightSource & | lightSource | ) |
AmbientLightSource assignment operator.
| lightSource | The AmbientLightSource to copy to this. |
this to allow for chaining of assignment.