Add support for point light and materials.

Add material to objects.
This commit is contained in:
Godzil
2020-02-17 19:12:57 +00:00
parent 73d60fb7e4
commit 5ebed12f4f
10 changed files with 274 additions and 1 deletions

32
source/include/light.h Normal file
View File

@@ -0,0 +1,32 @@
/*
* DoRayMe - a quick and dirty Raytracer
* Light header
*
* Created by Manoël Trapier
* Copyright (c) 2020 986-Studio.
*
*/
#ifndef DORAYME_LIGHT_H
#define DORAYME_LIGHT_H
#include <tuple.h>
#include <colour.h>
enum LightType
{
POINT_LIGHT = 0,
};
class Light
{
public:
Colour intensity;
Tuple position;
LightType type;
public:
Light(LightType type = POINT_LIGHT, Tuple position=Point(0, 0, 0),
Colour intensity=Colour(1, 1, 1)) : type(type), position(position), intensity(intensity) { };
};
#endif //DORAYME_LIGHT_H