[ADD] add a skeleton of the group and refactor some test datas.

This commit is contained in:
NADAL Jean-Baptiste
2024-03-22 11:59:00 +01:00
parent b3490b146e
commit f05603cb29
15 changed files with 403 additions and 131 deletions

View File

@@ -31,38 +31,12 @@
#include "raytracing.h"
#include "common_data.h"
using namespace Raytracer;
/* ------------------------------------------------------------------------- */
class TestShape : public Shape
{
public:
TestShape(void) = default;
Intersections local_intersect(const Ray &a_ray) override
{
saved_ray = a_ray;
return Intersections();
}
Tuple local_normal_at(const Tuple &a_local_point) const override
{
return Tuple::Vector(a_local_point.x(), a_local_point.y(), a_local_point.z());
}
Ray saved_ray;
};
/* ------------------------------------------------------------------------- */
TestShape test_shape(void)
{
return TestShape();
}
/* ------------------------------------------------------------------------- */
SCENARIO("The default transformation", "[features/shapes.feature]")
{
GIVEN("s <- test_shape()")