Smooth triangles! And support for them in the OBJ File parser.

Also add an interesting tea party scene!
This commit is contained in:
Godzil
2020-03-06 15:07:26 +00:00
parent 73012b6dd1
commit e57b5715e8
38 changed files with 705 additions and 75 deletions

View File

@@ -0,0 +1,28 @@
/*
* DoRayMe - a quick and dirty Raytracer
* Smooth Triangle header
*
* Created by Manoël Trapier
* Copyright (c) 2020 986-Studio.
*
*/
#ifndef DORAYME_SMOOTHTRIANGLE_H
#define DORAYME_SMOOTHTRIANGLE_H
#include <triangle.h>
class SmoothTriangle : public Triangle
{
public:
Vector n1;
Vector n2;
Vector n3;
protected:
Tuple localNormalAt(Tuple point, Intersection *hit);
public:
SmoothTriangle(Point p1, Point p2, Point p3, Vector n1, Vector n2, Vector n3);
};
#endif /* DORAYME_SMOOTHTRIANGLE_H */