1 // OpenGLView.h : interface of the COpenGLView class
\r
3 /////////////////////////////////////////////////////////////////////////////
\r
5 #if !defined(AFX_OPENGLVIEW_H__8E83909C_3A90_11D1_AB25_000000000000__INCLUDED_)
\r
6 #define AFX_OPENGLVIEW_H__8E83909C_3A90_11D1_AB25_000000000000__INCLUDED_
\r
10 #endif // _MSC_VER >= 1000
\r
14 class COpenGLView : public CView
\r
16 protected: // create from serialization only
\r
18 DECLARE_DYNCREATE(COpenGLView)
\r
22 GLint m_width; // øèðèíà îêíà OpenGL
\r
23 GLint m_height; // âûñîòà îêíà OpenGL
\r
24 POINT m_mousePosition;
\r
25 GLdouble m_translate[3];
\r
26 GLdouble m_rotate[16];
\r
30 CDocument* GetDocument();
\r
39 // ClassWizard generated virtual function overrides
\r
40 //{{AFX_VIRTUAL(COpenGLView)
\r
42 virtual void OnDraw(CDC* pDC); // overridden to draw this view
\r
43 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
\r
45 virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
\r
46 virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
\r
47 virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
\r
52 virtual void DrawScene(CDC* pDC = 0);
\r
53 void InitCameraPosition();
\r
54 void SetOwnContext();
\r
55 void TrackBall(CPoint last, CPoint init, double& angle, double& x, double& y, double& z);
\r
59 virtual ~COpenGLView();
\r
61 virtual void AssertValid() const;
\r
62 virtual void Dump(CDumpContext& dc) const;
\r
66 BOOL SetPixelFormat(HDC hdc);
\r
67 BOOL CreateGLContext(HDC hdc);
\r
69 // Generated message map functions
\r
72 //{{AFX_MSG(COpenGLView)
\r
73 afx_msg void OnDestroy();
\r
74 afx_msg void OnSize(UINT nType, int cx, int cy);
\r
75 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
\r
76 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
\r
78 DECLARE_MESSAGE_MAP()
\r
83 #ifndef _DEBUG // debug version in OpenGLView.cpp
\r
84 inline CDocument* COpenGLView::GetDocument()
\r
85 { return (CDocument*)m_pDocument; }
\r
88 /////////////////////////////////////////////////////////////////////////////
\r
90 //{{AFX_INSERT_LOCATION}}
\r
91 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
\r
93 #endif // !defined(AFX_OPENGLVIEW_H__8E83909C_3A90_11D1_AB25_000000000000__INCLUDED_)