www.pudn.com > opengl_pick_sample.rar > oglview.h
// oglview.h : interface of the OGLView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_OGLVIEW_H__B3F1195E_4B78_11D7_967B_08006912EAE7__INCLUDED_)
#define AFX_OGLVIEW_H__B3F1195E_4B78_11D7_967B_08006912EAE7__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "ogl3d.h"
#include "matrix3d.h"
class OGLView : public CView
{
protected: // create from serialization only
OGLView();
DECLARE_DYNCREATE(OGLView)
#ifndef SOLAR
OGL3D m_3dview;
#else
SolarSystem3D m_3dview;
#endif
Matrix3D m_view_matrix;
int m_left_down;
CPoint m_click_pt;
// Attributes
public:
OGLDoc* GetDocument();
void ShowImage(void);
void SetScale(double sf);
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(OGLView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual void OnInitialUpdate();
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~OGLView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(OGLView)
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnDrawLines();
afx_msg void OnUpdateLines(CCmdUI* pCmdUI);
afx_msg void OnDrawSolid();
afx_msg void OnUpdateSolid(CCmdUI* pCmdUI);
afx_msg void OnUpdateScale(CCmdUI* pCmdUI);
afx_msg void OnViewScale();
afx_msg void OnUpdateAxes(CCmdUI* pCmdUI);
afx_msg void OnViewAxes();
afx_msg void OnUpdateEarth(CCmdUI* pCmdUI);
afx_msg void OnViewEarth();
afx_msg void OnUpdateSolarSystem(CCmdUI* pCmdUI);
afx_msg void OnViewSolarSystem();
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in oglview.cpp
inline OGLDoc* OGLView::GetDocument()
{ return (OGLDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_OGLVIEW_H__B3F1195E_4B78_11D7_967B_08006912EAE7__INCLUDED_)