#ifndef TREE_NODE_HPP
#define TREE_NODE_HPP

#include "Body.hpp"
#include "Box.hpp"
#include <cstdlib>
#include <vector>

namespace nbody {
	using namespace std;

	class TreeNode {
		friend class Tree;
		friend class BarnesHutTree;
	protected:
		Box bb;
		vector<Body> bodies;
		vector<TreeNode*>::iterator afterSubtree;
	public:
		TreeNode();
		virtual ~TreeNode();
		virtual bool isSplitable();
		virtual void extendBBforBodies();
		virtual void extendBBtoCube();
		virtual Box getBB();
		virtual vector<Body> getBodies();
	};
}

#endif
