/***************************************************************************
*                                                                          *
*  Copyright (C) Golaem S.A.  All Rights Reserved.                         *
*                                                                          *
***************************************************************************/

#pragma once

#include "glmNavigationData.h"
#include "glmIRoadmapCosts.h"

namespace glm
{
	/** 
	* \brief Defines the weights of the roadmap for an entity.
	*
	* \ingroup PathFollower
	*
	* \author Golaem <dev@golaem.com>
	*/
	class GLM_SDK_API EntityRoadmapCosts : public IRoadmapCosts
	{
	public:

		GLM_CLASS_STAT_ID( glm::MemoryStatIds::Simulation)

		/**
		* \brief Constructor.
		*/
		EntityRoadmapCosts();

		virtual ~EntityRoadmapCosts(){}

		/**
		* \name Ancestor's definitions
		*/
		//@{
		virtual float getArcCost(const IOrientedGraph& queryGraph, const RoadmapArcId & arcId) const;
		virtual bool isArcUsable(const IOrientedGraph& queryGraph, const RoadmapArcId & arcId) const;
		virtual float getNodeCost(const IOrientedGraph& queryGraph, const RoadmapNodeId & waypointId) const;
		virtual bool isNodeUsable(const IOrientedGraph& queryGraph, const RoadmapNodeId & waypointId) const;
		virtual float getCostHeuristic(const IOrientedGraph& queryGraph, const RoadmapNodeId & widOrigin, const RoadmapNodeId & widDestination) const;
		virtual float getCostHeuristic(const IOrientedGraph& queryGraph, const RoadmapNodeId & widOrigin, const glm::Vector3& destination) const;
		//@}

		/// The path entity component.
		const NavigationData* _navigationData;

	private:
		GLM_DISALLOW_COPY_AND_ASSIGN( EntityRoadmapCosts );

	};
}
