[ADD] add a skeleton of the group and refactor some test datas.
This commit is contained in:
@@ -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()")
|
||||
|
||||
Reference in New Issue
Block a user