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

#pragma once

#include "glmSDKAPI.h"
#include "glmRoadmapNode.h"

#include <glmIndex.h>

namespace glm
{
	class SpatialEnvironment;

	/**
	* \brief Roadmap arc
	*
	* \ingroup Roadmap
	*
	* \author Golaem <dev@golaem.com> 
	*/
	class GLM_SDK_API RoadmapArc
	{
	public:

		GLM_CLASS_STAT_ID( glm::MemoryStatIds::Simulation)

		/**
		* \brief Default constructor.
		* This constructor build an invalid arc.
		*/
		RoadmapArc();

		/**
		* \brief Constructor
		*/
		RoadmapArc(
			const NavigationMeshCellId& cellId, 
			float length, 
			Angle slope,
			float distanceToNearestObstacle);

		/**
		* \brief Equality operator
		*/
		bool operator==(const RoadmapArc& arcData) const;

		/**
		* \brief Difference operator
		*/
		bool operator!=(const RoadmapArc& arcData) const;

		/// The cell id to which the arc is associated
		NavigationMeshCellId _cellId;

		/// The length of the arc
		float _length;

		/// The slope of the ground beneath the arc
		Angle _slope;

		/// The distance to the nearest obstacle
		float _distanceToNearestObstacle;

	private:
		friend class AbstractRoadmapCreator;
	};
}
