#ifndef __BVH_BINNED_BUILDER_H__
#define __BVH_BINNED_BUILDER_H__

#include "BVHBuilder.h"

#define NUMBER_OF_BINS 4

namespace VRUT
{
	class BVHBinnedBuilder : public BVHBuilder
	{
	private:
		VRUT_ALIGNED(16) Point binMin[NUMBER_OF_BINS];
		VRUT_ALIGNED(16) Point binMax[NUMBER_OF_BINS];
		unsigned int binCounter[NUMBER_OF_BINS];

	public:
		virtual BVHBottom * Build(const smart_pointer<Geometry> & geometry, unsigned int maxTrianglesPerLeaf = 0);

		BVHBinnedBuilder() : BVHBuilder() {}
	};
}

#endif /* __BVH_BINNED_BUILDER_H__ */
