Files
dorayme/source/shapes/testshape.cpp
Godzil e57b5715e8 Smooth triangles! And support for them in the OBJ File parser.
Also add an interesting tea party scene!
2020-03-06 15:07:26 +00:00

25 lines
475 B
C++

/*
* DoRayMe - a quick and dirty Raytracer
* Test shape implementation
*
* Created by Manoël Trapier
* Copyright (c) 2020 986-Studio.
*
*/
#include <shape.h>
#include <testshape.h>
TestShape::TestShape() : localRay(Point(0, 0, 0), Vector(0, 0, 0))
{
}
Intersect TestShape::localIntersect(Ray r)
{
this->localRay = r;
return Intersect();
}
Tuple TestShape::localNormalAt(Tuple point, Intersection *hit)
{
return Vector(point.x, point.y, point.z);
}