//
// Tools_Object_LOD.h
//
// Created by Richard Rice - 26/09/2002
// 
// Copyright (C) 2002 Rebellion, All Rights Reserved.
//


#ifdef ASURA_USE_PRAGMA_ONCE
    #pragma once
#endif

#ifndef _TOOLS_OBJECT_LOD_H_
#define _TOOLS_OBJECT_LOD_H_

#include "Objects/Tools_Object.h"

//Tools object for editing the LOD settings for a mesh
class Tools_Object_LOD : public Tools_Object
{
	public :
		Tools_Object_LOD(Asura_Mesh* pxMesh,const Asura_Vector_3* pxPosition);

		const char* GetName();
		const char* GetTypeDescription(){return "Level of Detail";}

		
		void PrintInfo(float& x,float& y);
		void OnSelection();
		void OnDeselection();
		bool CanBeDestroyed(){return false;}
		void UpdateWhileSelected();


	private :
		void CreateOverlay();
		void DeleteOverlay();

		static void SetMinimumVisibleDistance();

		Asura_Mesh* GetLODMesh();

		bool m_bAutoLOD;
		bool m_bDetailLevelChanged;
		int m_iDetailLevel;


		//static data for overlay
		static Asura_Vector_2 s_xOverlayPosition;
		static Tools_Object_LOD* s_pxThis;

};



#endif // _TOOLS_OBJECT_LOD_H_
