#pragma once

#include <irrlicht.h>
using namespace irr;

#include "TerrainBlockData.h"

class TerrainBlock : public scene::ISceneNode
{
	public:
		TerrainBlock(TerrainBlockData& data, scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id);
		~TerrainBlock();

		virtual void OnRegisterSceneNode();
		virtual void render();

		virtual const core::aabbox3d<f32>& getBoundingBox() const { return m_data.boundingBox(); }
		virtual u32 getMaterialCount() const { return 1; }
		virtual video::SMaterial& getMaterial(u32 i) { return m_data.material(); }	

	private:
		core::aabbox3d<f32> m_box;
		TerrainBlockData& m_data;
};

