Smooth triangles! And support for them in the OBJ File parser.
Also add an interesting tea party scene!
This commit is contained in:
28
source/include/smoothtriangle.h
Normal file
28
source/include/smoothtriangle.h
Normal 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 */
|
||||
Reference in New Issue
Block a user