2018-09-06 02:26:54 +00:00
|
|
|
#ifndef LIGHT_H
|
|
|
|
|
|
|
|
|
2018-09-20 02:15:53 +00:00
|
|
|
#include "camera.h"
|
2018-09-06 02:26:54 +00:00
|
|
|
#include "color.h"
|
2018-09-19 03:02:12 +00:00
|
|
|
#include "geometry.h"
|
|
|
|
#include "point.h"
|
2018-09-06 02:26:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
// STRUCTURES
|
2018-09-19 03:02:12 +00:00
|
|
|
struct Light
|
2018-09-06 02:26:54 +00:00
|
|
|
{
|
2018-09-19 03:02:12 +00:00
|
|
|
Point position;
|
|
|
|
ColorF32 color;
|
2018-09-06 02:26:54 +00:00
|
|
|
float intensity;
|
2018-09-19 03:02:12 +00:00
|
|
|
float falloffConstant;
|
|
|
|
float falloffLinear;
|
2018-09-06 02:26:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2018-09-19 03:02:12 +00:00
|
|
|
// PUBLIC FUNCTIONS
|
2018-09-21 03:06:27 +00:00
|
|
|
ColorF32 ComputeLight(Point &position, Vector &normal, Material &material, Light &light, Camera &camera);
|
2018-09-06 02:26:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define LIGHT_H
|
|
|
|
#endif
|
|
|
|
|