From 1a04caf6c6829c9672c74b0dbc97d01205ba3b2c Mon Sep 17 00:00:00 2001 From: Yoel <s73017@beuth-hochschule.de> Date: Fri, 16 Oct 2020 16:24:27 +0200 Subject: [PATCH] Small refactor for use of ShapeSingleGroup --- RayTracer/shape/Group.cpp | 4 ++-- RayTracer/shape/Group.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RayTracer/shape/Group.cpp b/RayTracer/shape/Group.cpp index 1f9ad75..5a532af 100644 --- a/RayTracer/shape/Group.cpp +++ b/RayTracer/shape/Group.cpp @@ -46,8 +46,8 @@ util::AxisAlignedBoundingBox Group::bounds() const { void Group::add(const Group& group) { add(std::make_shared<Group>(group)); } -void Group::add(const SingleGroup& group) { - add(std::make_shared<SingleGroup>(group)); +void Group::add(const ShapeSingleGroup& group) { + add(std::make_shared<ShapeSingleGroup>(group)); } void Group::add(const std::shared_ptr<Shape>& shape) { shapeList.push_back(shape); diff --git a/RayTracer/shape/Group.h b/RayTracer/shape/Group.h index 36e4104..91d5bbc 100644 --- a/RayTracer/shape/Group.h +++ b/RayTracer/shape/Group.h @@ -5,7 +5,7 @@ #include "../tools/Mat4.h" #include "../tools/Transformation.h" #include "Shape.h" -#include "SingleGroup.h" +#include "ShapeSingleGroup.h" namespace shapes { class Group : public Shape { @@ -16,9 +16,9 @@ class Group : public Shape { std::optional<cam::Hit> intersect(const cam::Ray& r) const override; util::AxisAlignedBoundingBox bounds() const override; void add(const Group& group); - void add(const SingleGroup& group); + void add(const ShapeSingleGroup& group); - protected: + // protected: void add(const std::shared_ptr<shapes::Shape>& shape); private: -- GitLab