testshape.cpp 456 B

12345678910111213141516171819202122232425
  1. /*
  2. * DoRayMe - a quick and dirty Raytracer
  3. * Test shape implementation
  4. *
  5. * Created by Manoël Trapier
  6. * Copyright (c) 2020 986-Studio.
  7. *
  8. */
  9. #include <shape.h>
  10. #include <testshape.h>
  11. TestShape::TestShape() : localRay(Point(0, 0, 0), Vector(0, 0, 0))
  12. {
  13. }
  14. Intersect TestShape::localIntersect(Ray r)
  15. {
  16. this->localRay = r;
  17. return Intersect();
  18. }
  19. Tuple TestShape::localNormalAt(Tuple point)
  20. {
  21. return Vector(point.x, point.y, point.z);
  22. }