Add a way to remove shapes from groups

This commit is contained in:
Godzil
2020-03-10 09:16:39 +00:00
parent add3d7c861
commit b89f9ec331
3 changed files with 70 additions and 3 deletions

View File

@@ -37,7 +37,10 @@ public:
bool isEmpty();
void addObject(Shape *s);
Shape *operator[](const int p) { return this->objectList[p]; }
void removeObject(Shape *s);
Shape *operator[](const int p) { return this->objectList[p]; };
Shape *getUnboxable(const int p) { return this->unboxableObjectList[p]; };
Intersect intersect(Ray r);
BoundingBox getLocalBounds();
@@ -48,7 +51,8 @@ public:
bool includes(Shape *b);
uint32_t getObjectCount() { return this->objectCount + this->unboxableObjectCount; };
uint32_t getObjectCount() { return this->objectCount; };
uint32_t getUnboxableCount() { return this->unboxableObjectCount; };
Group(const char *name = nullptr);