Update the changelog
[opencv] / apps / StereoGR / OpenGLView.h
1 // OpenGLView.h : interface of the COpenGLView class\r
2 //\r
3 /////////////////////////////////////////////////////////////////////////////\r
4 \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
7 \r
8 #if _MSC_VER >= 1000\r
9 #pragma once\r
10 #endif // _MSC_VER >= 1000\r
11 \r
12 #include <gl\gl.h>\r
13 \r
14 class COpenGLView : public CView\r
15 {\r
16 protected: // create from serialization only\r
17   COpenGLView();\r
18   DECLARE_DYNCREATE(COpenGLView)\r
19 \r
20 // Attributes\r
21 protected:\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
27 \r
28 \r
29 public:\r
30   CDocument* GetDocument();\r
31 \r
32 // Operations\r
33 public:\r
34 \r
35 protected:\r
36   CClientDC  *m_pDC;\r
37 \r
38 // Overrides\r
39   // ClassWizard generated virtual function overrides\r
40   //{{AFX_VIRTUAL(COpenGLView)\r
41   public:\r
42   virtual void OnDraw(CDC* pDC);  // overridden to draw this view\r
43   virtual BOOL PreCreateWindow(CREATESTRUCT& cs);\r
44   protected:\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
48   //}}AFX_VIRTUAL\r
49 \r
50 // Implementation\r
51 public:\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
56   void Swap();\r
57   void EndScene();\r
58   void BeginScene();\r
59   virtual ~COpenGLView();\r
60 #ifdef _DEBUG\r
61   virtual void AssertValid() const;\r
62   virtual void Dump(CDumpContext& dc) const;\r
63 #endif\r
64 \r
65 protected:\r
66   BOOL SetPixelFormat(HDC hdc);\r
67   BOOL CreateGLContext(HDC hdc);\r
68 \r
69 // Generated message map functions\r
70 protected:\r
71   int InitOpenGL();\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
77   //}}AFX_MSG\r
78   DECLARE_MESSAGE_MAP()\r
79 private:\r
80   HGLRC m_hrc;\r
81 };\r
82 \r
83 #ifndef _DEBUG  // debug version in OpenGLView.cpp\r
84 inline CDocument* COpenGLView::GetDocument()\r
85    { return (CDocument*)m_pDocument; }\r
86 #endif\r
87 \r
88 /////////////////////////////////////////////////////////////////////////////\r
89 \r
90 //{{AFX_INSERT_LOCATION}}\r
91 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.\r
92 \r
93 #endif // !defined(AFX_OPENGLVIEW_H__8E83909C_3A90_11D1_AB25_000000000000__INCLUDED_)