#ifndef MORPHPLAYWIN_H
#define MORPHPLAYWIN_H


#include "MorphWin.h"


class MorphPlayWin : public MorphWin
{
public:
	MorphPlayWin();
	BOOL CreateScene();
protected:
	//{{AFX_MSG(MorphPlayWin)
	afx_msg void OnRenderWireframe();
	afx_msg void OnRenderFlat();
	afx_msg void OnRenderGouraud();
	afx_msg void OnUpdateRenderFlat(CCmdUI* pCmdUI);
	afx_msg void OnUpdateRenderGouraud(CCmdUI* pCmdUI);
	afx_msg void OnUpdateRenderWireframe(CCmdUI* pCmdUI);
	afx_msg void OnFileOpen();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
    BOOL InitMorphSequence( const CString& );
    static void UpdateMorph(LPDIRECT3DRMFRAME frame, void*, D3DVALUE);
    static void UpdateDrag(LPDIRECT3DRMFRAME frame, void*, D3DVALUE);
    void OnIdle(LONG);
private:
    LPDIRECT3DRMFRAME frame;
    LPDIRECT3DRMMESH mesh;
    int morphspeed;
    D3DVALUE morphtimeinc;
    D3DVALUE maxmorphtime;
    static D3DVALUE morphtime;

    static BOOL drag;
    static BOOL end_drag;
    static int last_x, last_y;
};


#endif
