
///////////////////////////////////////////////////////////////////////////////
//
// File   : AVP_Collision_Descriptor.h
// Author : Will Plano
// Date   : 21/02/2008
//
// Copyright (C) 2008 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif   // ifdef ASURA_USE_PRAGMA_ONCE

#ifndef __AVP_COLLISION_DECRIPTOR_H__
#define __AVP_COLLISION_DECRIPTOR_H__

////////////////////////////////////////////////////////////////////////////////
// Include files...
////////////////////////////////////////////////////////////////////////////////

#include "Core/Asura_HashTree.h"
#include "Physics/Asura_Physics_Object.h"
#include "Dynamics/Asura_Collision_Object.h"

class AVP_Collision_Descriptor
{
public:
	AVP_Collision_Descriptor();
	~AVP_Collision_Descriptor() { delete m_pxCollisionBox; }
	void InitialiseFromBlueprint( const Asura_Hash_ID uBlueprintHash );

	// Accessor functions...
	const Asura_Collision_Box*				GetCollisionBox() const	{ return m_pxCollisionBox; }
	Asura_Physics_Object::COLLISION_PROXY	GetCollisionProxy() const	{ return m_eCollisionProxy; }

	static const AVP_Collision_Descriptor* GetDataByHash( const Asura_Hash_ID uHash );
	static void ResetStorage() { s_xHashTree.Reset() ;}

private:
	// Private typedefs...
	Asura_Collision_Box*					m_pxCollisionBox;
	Asura_Physics_Object::COLLISION_PROXY	m_eCollisionProxy;

	static Asura_TemplateHashTree< AVP_Collision_Descriptor > s_xHashTree;

	AVP_Collision_Descriptor(const AVP_Collision_Descriptor& xOther);
	AVP_Collision_Descriptor&	operator=(const AVP_Collision_Descriptor& xOther);

}; 

#endif   // ifndef __AVP_COLLISION_DECRIPTOR_H__

/// End of file. ///
