LiFengView.h
资源名称:虚拟地形建模.rar [点击查看]
上传用户:dfjhuyju
上传日期:2013-03-13
资源大小:11035k
文件大小:3k
源码类别:
OpenGL
开发平台:
Visual C++
- // LiFengView.h : interface of the CLiFengView class
- //
- /////////////////////////////////////////////////////////////////////////////
- #if !defined(AFX_LIFENGVIEW_H__C1CB4746_6B2E_4EDC_9A64_1819F32E6A4F__INCLUDED_)
- #define AFX_LIFENGVIEW_H__C1CB4746_6B2E_4EDC_9A64_1819F32E6A4F__INCLUDED_
- #include "LiFeng_Texture.h"
- #include "Vector3.h"
- #include "SkyBox.h"
- #include "Dem.h"
- #include "LiFeng_Camera.h"
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- class CLiFengView : public CView
- {
- //****************************************************************************************//
- // 系统相关代码
- //****************************************************************************************//
- protected: // create from serialization only
- CLiFengView();
- DECLARE_DYNCREATE(CLiFengView)
- // Attributes
- public:
- CLiFengDoc* GetDocument();
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CLiFengView)
- 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
- // Implementation
- public:
- virtual ~CLiFengView();
- public:
- BOOL RenderScene();
- BOOL SetupPixelFormat(void);
- void SetLogicalPalette(void);
- BOOL InitializeOpenGL(CDC* pDC);
- protected:
- HGLRC m_hrc;
- HPALETTE m_hPalette;
- CDC* m_pDC;
- //****************************************************************************************//
- // 自己添加代码
- //****************************************************************************************//
- // 添加自己的公共函数
- public:
- void InitScene();
- //添私有函数
- private:
- //添加公有数据
- public:
- LiFeng_Texture mytexture;
- LiFeng_Camera mycamera;
- CSkyBox myskybox;
- CDem m_Dem;
- int Win_Width;
- int Win_Height;
- //添加保护数据
- protected:
- GLuint texture[2];
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- // Generated message map functions
- protected:
- //{{AFX_MSG(CLiFengView)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnDestroy();
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg void OnTimer(UINT nIDEvent);
- afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
- afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- #ifndef _DEBUG // debug version in LiFengView.cpp
- inline CLiFengDoc* CLiFengView::GetDocument()
- { return (CLiFengDoc*)m_pDocument; }
- #endif
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_LIFENGVIEW_H__C1CB4746_6B2E_4EDC_9A64_1819F32E6A4F__INCLUDED_)