// MeshWarp.h: interface for the CMeshWarp class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MESHWARP_H__69F15483_5014_4732_8590_56E9553128E4__INCLUDED_)
#define AFX_MESHWARP_H__69F15483_5014_4732_8590_56E9553128E4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

typedef struct _MESHPOINT {
	int x;
	int y;
} MESHPOINT;

#include "IMG.h"

class CMeshWarp : public CIMG 
{
public:
	void Morphing(CIMG*src1, CIMG*src2, CIMG*dest, MESHPOINT *srcMesh, MESHPOINT *destMesh, int widthMesh, int heightMesh, float u);
	void MeshWarp(CIMG*src, CIMG*dest, MESHPOINT *srcMesh, MESHPOINT *destMesh, int widthMesh, int heightMesh);
	void FantsResamplingWidth(CIMG*src, CIMG*dest, int srcStart, int srcEnd, int destStart, int destEnd, int h);
	void FantsResamplingHeight(CIMG*src, CIMG*dest, int srcStart, int srcEnd, int destStart, int destEnd, int w);
	void LoadSrcIMG(CString filename);
	CMeshWarp();
	virtual ~CMeshWarp();
private:
	BOOL		m_bLoaded;
	CIMG		*m_pSrcIMG;
	CIMG		*m_pDestIMG;
	int			m_nWidth;
	int			m_nHeight;
};

#endif // !defined(AFX_MESHWARP_H__69F15483_5014_4732_8590_56E9553128E4__INCLUDED_)
