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

#pragma once

#include "glmAbstractNavigationMesh3Creator.h"
#include <glmProgress.h>
#include "glmGseIStream.h"

namespace glm
{
	/** 
	* \brief Proprietary GSE (Golaem Spatial Environment) navigation mesh 3 loader.
	*
	* \ingroup NavMesh3
	*
	* \author Golaem <dev@golaem.com>
	*/
	class GLM_SDK_API NavigationMesh3GseLoader : public AbstractNavigationMesh3Creator
	{
	public:
		/**
		* \brief Constructor
		*/
		NavigationMesh3GseLoader(GseIStream & gseStream);

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

		/**
		* \name Progress
		*/
		//@{
		inline const Progress::SP getProgress() const;
		inline Progress::SP touchProgress();
		//@}

	protected:

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

		Progress::SP _progress;

		GseIStream* _stream;
	};

	//*****************************************************************************
	// NavigationMesh3GseLoader inline definitions
	//*****************************************************************************

	//-----------------------------------------------------------------------------
	// getProgress
	//-----------------------------------------------------------------------------
	const Progress::SP NavigationMesh3GseLoader::getProgress() const
	{
		return _progress;
	}

	//-----------------------------------------------------------------------------
	// touchProgress
	//-----------------------------------------------------------------------------
	Progress::SP NavigationMesh3GseLoader::touchProgress()
	{
		return _progress;
	}
}
