/****************************************************************************************************

		PointsMerger.cpp
		Copyright: (c) 2007 Daz Productions Inc. All rights reserved.

		Author:	Mathieu
		Date:	5/02/2007

****************************************************************************************************/

#ifndef __PointsMerger__
#define __PointsMerger__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "MCBasicTypes.h"
#include "MCArray.h"
#include "MCClassArray.h"


class TPointsMerger : public TMCObject
{
public:
	TPointsMerger(); 
	~TPointsMerger();

	bool GiveMergingStatus() {return fPointsMerged;}
	void MergeSamePoints(const TMCArray<TVector2f>& originalPointsList, TMCArray<TVector2f>& mergedPointsList);
	void InterpolatePosesWithSamePoints(TVectorN<real64>& paramValues); // Input and output parameter
				    
protected:
	// TMCArray<TVector2f> 	fPointList; // Original points list
	TMCArray<TVector2f> 	fMergedPointsList; // Merged points list in case some points are at the same location
	TMCArray<int32>		fSamePointsLocationInOldTable;
	TMCArray<int32>		fSamePointsIndexesInNewTable;
	bool				fPointsMerged;
};


#endif
