#pragma once

#include <irrlicht.h>
using namespace irr;

class CityBlocks : public scene::ISceneNode
{
	public:
		CityBlocks(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id);
		~CityBlocks();

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

		virtual const core::aabbox3d<f32>& getBoundingBox() const { return m_box; }
		virtual u32 getMaterialCount() const { return 1; }
		virtual video::SMaterial& getMaterial(u32 i) { return m_material; }	

	private:
		static const float FLOOR_HEIGHT;
		static const unsigned VERTEX_COUNT = 4;		// 4 vertex per face. 1 face.
		static const unsigned INDEX_COUNT = 6;		// 6 values per face, 1 face.
		static const unsigned PRIMITIVE_COUNT = 2;	// 2 triangles per face, 1 faces.

		const core::vector3df m_size;
		core::aabbox3d<f32> m_box;
		video::S3DVertex m_vertices[VERTEX_COUNT];
		u16 m_indices[INDEX_COUNT];
		video::SMaterial m_material;
};

