#ifndef MESHPICKWIN_H
#define MESHPICKWIN_H


#include "RMWin.h"

struct DragData
{
    LPDIRECT3DRMFRAME frame;
    POINT mousedown;
    D3DVALUE origx,origy;
};

class MeshPickWin : public RMWin
{
public:
	MeshPickWin();
	BOOL CreateScene();
protected:
	//{{AFX_MSG(MeshPickWin)
	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 OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	LPDIRECT3DRMMESHBUILDER meshbuilder;
private:
    static void UpdateDrag(LPDIRECT3DRMFRAME frame, void*, D3DVALUE);
    BOOL PickMesh( const CPoint& point );
private:
    static DragData drag;
};


#endif
