Renaming Object to Shape (part 2)

This commit is contained in:
Godzil
2020-02-18 11:43:05 +00:00
parent 5a4f9f4dc4
commit af96d52c5a
4 changed files with 6 additions and 6 deletions

36
source/shapes/shape.cpp Normal file
View File

@@ -0,0 +1,36 @@
/*
* DoRayMe - a quick and dirty Raytracer
* Object implementation
*
* Created by Manoël Trapier
* Copyright (c) 2020 986-Studio.
*
*/
#include <ray.h>
#include <shape.h>
#include <matrix.h>
#include <tuple.h>
#include <intersect.h>
Shape::Shape()
{
this->transformMatrix = Matrix4().identity();
this->inverseTransform = this->transformMatrix.inverse();
}
Intersect Shape::intersect(Ray r)
{
return Intersect();
};
Tuple Shape::normalAt(Tuple point)
{
return Vector(0, 0, 0);
}
void Shape::setTransform(Matrix transform)
{
this->transformMatrix = transform;
this->inverseTransform = transform.inverse();
}