//==============================================================================
/*! \file
 * OpenMesh Toolkit for mesh analysis    \n
 * Copyright (c) 2010 by Rostislav Hulik     \n
 *
 * Author:  Rostislav Hulik, rosta.hulik@gmail.com  \n
 * Date:    2010/11/21                          \n
 *
 * This file is part of software developed for support of Rostislav Hulik's dissertation thesis at dcgm-robotics@FIT group.
 *
 * This file is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This file is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this file.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * Module description:
 * - Module rasterizes vertex neighbourhood on a tangent raster
 * - Result is sent to connected MDSTk channel
 */

#ifndef _OM_COMPUTE_DESCRIPTORS_H_
#define _OM_COMPUTE_DESCRIPTORS_H_

#include <MDSTk/Module/mdsModule.h>

/**
 * Module rasterizes vertex neighbourhood on a tangent raster
 */
class OMComputeDescriptors : public mds::mod::CModule
{
	public:
		/**
		 * Smart pointer type
		 */
		MDS_SHAREDPTR(OMComputeDescriptors);

		/**
		 * Constructor
		 * @param sDescription Description of the module
		 */
		OMComputeDescriptors(const std::string& sDescription);

		/**
		 * Virtual destructor
		 */
		virtual ~OMComputeDescriptors();

	protected:
		/**
		 * Virtual method called on startup
		 * @returns True if startup was successful
		 */
		virtual bool startup();

		/**
		 * Virtual method called by the processing thread
		 * @returns True if main loop continues
		 */
		virtual bool main();

		/**
		 * Called on console shutdown
		 */
		virtual void shutdown();

		/**
		 * Called on writing a usage statement
		 * @param Stream Output stream
		 */
		virtual void writeExtendedUsage(std::ostream& Stream);

		/**
		 * Size argument value
		 */
		double m_size;

		/**
		 * Diameter argument value
		 */
		double m_diameter;

		/** 
		 * Resolution argument value
		 */
		int m_resolution;

		/**
		 * Count argument value
		 */
		int m_count;

		/**
		 * Output filename
		 */
		std::string m_output_file;
};

/**
 * Smart pointer to console application
 */
typedef OMComputeDescriptors::tSmartPtr    OMComputeMatricesPtr;

#endif // _OM_COMPUTE_MATRICES_H_