Boundingboxes should be ready.
Next step (later) would be to properly use them other than group to lower the number of intersection calculation per ray.
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
|
||||
#include <shape.h>
|
||||
|
||||
/* TODO: Add a way to force(?) material from group to be applied on childs */
|
||||
|
||||
class Group : public Shape
|
||||
{
|
||||
private:
|
||||
@@ -18,11 +20,15 @@ private:
|
||||
Shape* *objectList;
|
||||
uint32_t objectCount;
|
||||
|
||||
uint32_t allocatedUnboxableObjectCount;
|
||||
Shape* *unboxableObjectList;
|
||||
uint32_t unboxableObjectCount;
|
||||
|
||||
protected:
|
||||
Intersect localIntersect(Ray r);
|
||||
Tuple localNormalAt(Tuple point);
|
||||
|
||||
|
||||
BoundingBox bounds;
|
||||
|
||||
public:
|
||||
bool isEmpty();
|
||||
@@ -34,6 +40,8 @@ public:
|
||||
|
||||
BoundingBox getBounds();
|
||||
|
||||
void updateBoundingBox();
|
||||
|
||||
Group();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user