/// 
/// Asura_PlatformRender_MultiElementSkin.h
///
/// Created by KJL - 05/11/2003 17:35:19
///
/// Copyright (C) 2003 Rebellion, All Rights Reserved.
///
///


#ifdef ASURA_USE_PRAGMA_ONCE
	#pragma once
#endif

#ifndef __ASURA_PLATFORMRENDER_MULTIELEMENTSKIN_H__
#define __ASURA_PLATFORMRENDER_MULTIELEMENTSKIN_H__

#include "Core/Asura_Maths.h"

class Asura_Hierarchy_Skin;

//! \defgroup Rendering 
//! Rendering covers many areas. 
//! -# Environment
//! -# Objects
//! -# Characters


//! The Mysterious Interface class!
//!
//!    This is an entry that will appear in the Asura Documentation, but hopefully
//! this is easy to read when browsing code too. If this comment was above a class
//! definition then doxygen would automatically link this text to that class.
//!
//!    Which is nice.
//!
//!



//////////////////////////////////////////////////////////////////////////////////////
//! \ingroup Rendering
//! PC renderer for characters
//! 
//!	This system is designed to take a reference to an Asura_Hierarchy_Skin and:
//! -# extract the name/hash value 
//! -# create a stripped model if tools version
//! -# draw it 
//!
//! Some more text.
//////////////////////////////////////////////////////////////////////////////////////

class Asura_Direct3D_MultiElementSkin_Renderer
{
	public:
		static void Initialise(void);
		static void Shutdown(void);

		//! render the skin
		static void Render(const Asura_Hierarchy_Skin* pxSkin, const Asura_Bounding_Box& xLightingBB, const float fAlpha);
			
		//! KJL - 06/11/2003 10:39:16 - allocate a new skin for this name.
		//! Returns 0 if there is no more space or if a skin of that name already exists,
		//! with the appropriate asserts
		static class Asura_Direct3D_MultiElementSkin* AddSkin(const char* szName, const u_int uNumberOfVertices, const u_int uNumberOfIndices, const u_int uNumberOfElements);

		//! Free up the memory for a skin that is no longer needed. returns true if successful
		static bool DeleteSkin(const Asura_Hierarchy_Skin* pxSkin);
		
		//! KJL - 14/04/2003 14:38:52 - get strip for given name; asserts and returns 0 if name not found
		static const class Asura_Direct3D_MultiElementSkin* GetSkin(const Asura_Hierarchy_Skin* pxSkin);

		//! Gets the material used by the skin.
		static int GetMaterialIndex(const Asura_Hierarchy_Skin* pxSkin);

	private:

		static class Asura_Direct3D_MultiElementSkin**	s_ppxSkinStorage;
		static u_int									s_uNumberOfSkinsStored;
		static class Asura_NameTree*					s_pxNameTree;

};

#endif//__ASURA_PLATFORMRENDER_MULTIELEMENTSKIN_H__

