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

#pragma once

#include "glmSDKAPI.h"
#include "glmPathDefinitions.h"

namespace glm
{
	class Roadmap;
	class NavigationMesh3;
	/** 
	* \brief Interface defining classes able to create Roadmap instances
	*
	* \ingroup Roadmap
	*
	* \author Golaem <dev@golaem.com>
	*/
	class GLM_SDK_API AbstractRoadmapCreator
	{
	public:

		GLM_ABSTRACTCLASS_STAT_ID( glm::MemoryStatIds::Simulation)

		/**
		* \brief Constructor
		*/
		AbstractRoadmapCreator();

		/**
		* \brief Destructor
		*/
		virtual ~AbstractRoadmapCreator();

		/**
		* \brief Create a new roadmap.
		*/
		Roadmap* computeRoadmap(const NavigationMesh3& navigationMesh, bool& cancel);

		/**
		* \brief The roadmap that is created.
		*/
		Roadmap* _roadmap;

	protected:

		/**
		* \brief The method to implement to perform computations.
		*/
		virtual bool doComputation(bool& cancel) = 0;

		/**
		* \name Roadmap accesses
		*/
		//@{
#if GLM_ROADMAP_ERASE_SUPPORT_ENABLE
		void eraseArc(const RoadmapArcId& arcId);
		void eraseNode(const RoadmapNodeId& nodeId);
#endif
		//static void updateNodeNavMesh(Roadmap* roadmap, const RoadmapNodeId& nodeId);
		//@}
	};
}
