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

		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<TMCPoint>& originalPointsList, TMCArray<TMCPoint>& mergedPointsList);
	void InterpolatePosesWithSamePoints(TVectorN<real64>& paramValues); // Input and output parameter
				    
protected:
	// TMCArray<TMCPoint> 	fPointList; // Original points list
	TMCArray<TMCPoint> 	fMergedPointsList; // Merged points list in case some points are at the same location
	TMCArray<int32>		fSamePointsLocationInOldTable;
	TMCArray<int32>		fSamePointsIndexesInNewTable;
	bool				fPointsMerged;
};


#endif
