Skip to content
Snippets Groups Projects
Commit 1a04caf6 authored by Yoel's avatar Yoel
Browse files

Small refactor for use of ShapeSingleGroup

parent 45929aae
No related branches found
No related tags found
No related merge requests found
...@@ -46,8 +46,8 @@ util::AxisAlignedBoundingBox Group::bounds() const { ...@@ -46,8 +46,8 @@ util::AxisAlignedBoundingBox Group::bounds() const {
void Group::add(const Group& group) { void Group::add(const Group& group) {
add(std::make_shared<Group>(group)); add(std::make_shared<Group>(group));
} }
void Group::add(const SingleGroup& group) { void Group::add(const ShapeSingleGroup& group) {
add(std::make_shared<SingleGroup>(group)); add(std::make_shared<ShapeSingleGroup>(group));
} }
void Group::add(const std::shared_ptr<Shape>& shape) { void Group::add(const std::shared_ptr<Shape>& shape) {
shapeList.push_back(shape); shapeList.push_back(shape);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include "../tools/Mat4.h" #include "../tools/Mat4.h"
#include "../tools/Transformation.h" #include "../tools/Transformation.h"
#include "Shape.h" #include "Shape.h"
#include "SingleGroup.h" #include "ShapeSingleGroup.h"
namespace shapes { namespace shapes {
class Group : public Shape { class Group : public Shape {
...@@ -16,9 +16,9 @@ class Group : public Shape { ...@@ -16,9 +16,9 @@ class Group : public Shape {
std::optional<cam::Hit> intersect(const cam::Ray& r) const override; std::optional<cam::Hit> intersect(const cam::Ray& r) const override;
util::AxisAlignedBoundingBox bounds() const override; util::AxisAlignedBoundingBox bounds() const override;
void add(const Group& group); 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); void add(const std::shared_ptr<shapes::Shape>& shape);
private: private:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment