⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zsvegaview.h

📁 vega 于mfc结合的碰撞检测源代码
💻 H
字号:
#ifndef _ZSVEGAVIEW_H
#define _ZSVEGAVIEW_H


class vgWindow;
class vgGfx;
class vgChannel;
class vgObserver;
class vgScene;


class zsVegaView : public CView
{

	BOOL		vegaInitted;
	BOOL		vegaDefined;
	BOOL		vegaConfiged;
	BOOL		continueRunning;
	CWinThread*	vegaThread;


protected:
	DECLARE_DYNCREATE(zsVegaView)

	// These are the 0th instance of each of these from the adf
	vgWindow*	win;
	vgGfx*		gfx;
	vgChannel*	chan;
	vgObserver*	obs;
	vgScene*	scene;



// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(zsVegaView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

public:

	zsVegaView();
	virtual ~zsVegaView();

#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Creates a borderless window
	BOOL		create( const RECT& rect, CWnd* parent );

	void		runVega( void );
	void		stopVega( void );

	void		pauseVega( void );
	void		unPauseVega( void );

	HWND		getSafeHwnd( void );

	BOOL		getContinueRunning( void ) const { return continueRunning; }

	BOOL		getVegaInitted( void ) const { return vegaInitted; }
	void		setVegaInitted( BOOL i ) { vegaInitted = i; }
	BOOL		getVegaDefined( void ) const { return vegaDefined; }
	void		setVegaDefined( BOOL i ) { vegaDefined = i; }
	BOOL		getVegaConfiged( void ) const { return vegaConfiged; }
	void		setVegaConfiged( BOOL i ) { vegaConfiged = i; }


	vgWindow*	getVGWin( void ) const { return win; }
	vgGfx*		getVGGfx( void ) const { return gfx; }
	vgChannel*	getVGChannel( void ) const { return chan; }
	vgObserver*	getVGObserver( void ) const { return obs; }
	vgScene*	getVGScene( void ) const { return scene; }

	void toggleGfx( int what );


	virtual const char*	getAdfName( void );

	virtual void	postInit( void );
	virtual void	postDefine( void );
	virtual void	postConfig( void );

	virtual void	postSync( void );
	virtual void	postFrame( void );


// Generated message map functions
protected:
	//{{AFX_MSG(zsVegaView)
	afx_msg void OnSize(UINT nType, int cx, int cy);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};


/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -