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

#pragma once

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

namespace glm
{
	/** 
	* \brief Proprietary GSE (Golaem Spatial Environment) prismatic subdivision saver.
	*
	* \ingroup NavMesh3
	*
	* \author Golaem <dev@golaem.com>
	*/
	class GLM_SDK_API NavigationMesh3GseSaver : private AbstractNavigationMesh3Creator
	{
	public:
		/**
		* \brief Constructor
		*/
		NavigationMesh3GseSaver(GseOStream & gseStream);

		/**
		* \brief Destructor
		*/
		~NavigationMesh3GseSaver();

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

		bool operator()(const NavigationMesh3 & navigationMesh3);

	protected:

		bool doComputation(bool& /*cancel*/){return false;}

		Progress::SP _progress;

		GseOStream * _stream;
	};

	//*****************************************************************************
	// NavigationMesh3GseSaver inline definitions
	//*****************************************************************************

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

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