struct AABB { Point mCorners[2]; AABB(const float width, const float height, const float depth); }; class Node { public: void addChild(Node &child); void drawRecursive(); virtual void draw() = 0; virtual const AABB& aabb() const = 0; virtual void collidedWithOther(Node &node) = 0; protected: virtual ~Node() {} std::vector < Node* > mChildren; }; class Box: public Node { public: void draw(); const AABB& aabb() const; void collidedWithOther(Node &node); };