1 /*M///////////////////////////////////////////////////////////////////////////////////////
\r
3 // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
\r
5 // By downloading, copying, installing or using the software you agree to this license.
\r
6 // If you do not agree to this license, do not download, install,
\r
7 // copy or use the software.
\r
10 // Intel License Agreement
\r
11 // For Open Source Computer Vision Library
\r
13 // Copyright (C) 2000, Intel Corporation, all rights reserved.
\r
14 // Third party copyrights are property of their respective owners.
\r
16 // Redistribution and use in source and binary forms, with or without modification,
\r
17 // are permitted provided that the following conditions are met:
\r
19 // * Redistribution's of source code must retain the above copyright notice,
\r
20 // this list of conditions and the following disclaimer.
\r
22 // * Redistribution's in binary form must reproduce the above copyright notice,
\r
23 // this list of conditions and the following disclaimer in the documentation
\r
24 // and/or other materials provided with the distribution.
\r
26 // * The name of Intel Corporation may not be used to endorse or promote products
\r
27 // derived from this software without specific prior written permission.
\r
29 // This software is provided by the copyright holders and contributors "as is" and
\r
30 // any express or implied warranties, including, but not limited to, the implied
\r
31 // warranties of merchantability and fitness for a particular purpose are disclaimed.
\r
32 // In no event shall the Intel Corporation or contributors be liable for any direct,
\r
33 // indirect, incidental, special, exemplary, or consequential damages
\r
34 // (including, but not limited to, procurement of substitute goods or services;
\r
35 // loss of use, data, or profits; or business interruption) however caused
\r
36 // and on any theory of liability, whether in contract, strict liability,
\r
37 // or tort (including negligence or otherwise) arising in any way out of
\r
38 // the use of this software, even if advised of the possibility of such damage.
\r
40 //M*/// StereoGRView.h : interface of the CStereoGRView class
\r
42 /////////////////////////////////////////////////////////////////////////////
\r
44 #if !defined(AFX_STEREOGRVIEW_H__0603BB32_3287_4D21_ADCE_7B314B91C460__INCLUDED_)
\r
45 #define AFX_STEREOGRVIEW_H__0603BB32_3287_4D21_ADCE_7B314B91C460__INCLUDED_
\r
49 #endif // _MSC_VER > 1000
\r
52 #include "OpenGLView.h"
\r
56 using namespace std;
\r
58 class CStereoGRView : public COpenGLView
\r
60 protected: // create from serialization only
\r
62 DECLARE_DYNCREATE(CStereoGRView)
\r
66 CStereoGRDoc* GetDocument();
\r
74 // ClassWizard generated virtual function overrides
\r
75 //{{AFX_VIRTUAL(CStereoGRView)
\r
77 virtual void OnDraw(CDC* pDC); // overridden to draw this view
\r
78 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
\r
79 virtual void OnInitialUpdate();
\r
81 virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
\r
82 virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
\r
83 virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
\r
89 void Translate(float val);
\r
90 void RotateIncl(float val);
\r
91 void RotateAzim(float val);
\r
92 void RetrievePointCloud();
\r
93 void DrawScene(CDC* pDC = 0);
\r
94 void InitMagicCube();
\r
95 void OnDrawMagicCube();
\r
96 void UpdatePosition();
\r
99 BOOL RetrieveUserImage();
\r
101 IplImage* GetRecipient();
\r
102 // void SetImage(IplImage* image, BOOL copy = FALSE);
\r
103 IplImage* GetImage();
\r
106 BOOL RetrieveImage();
\r
107 void UpdateParams();
\r
108 virtual ~CStereoGRView();
\r
110 virtual void AssertValid() const;
\r
111 virtual void Dump(CDumpContext& dc) const;
\r
116 // Generated message map functions
\r
118 void OnDrawPointCloud();
\r
119 void OnDrawImage(CDC* pDC);
\r
120 //{{AFX_MSG(CStereoGRView)
\r
121 afx_msg void OnSize(UINT nType, int cx, int cy);
\r
122 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
\r
123 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
\r
124 afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point);
\r
125 afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
\r
126 afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
\r
128 DECLARE_MESSAGE_MAP()
\r
130 vector<float> m_points;
\r
131 BOOL m_wasInitialized;
\r
132 void ScaleTextures(int width, int height, const void** bits, int count);
\r
133 void InitTexture(int width, int height);
\r
134 void ProcessImage();
\r
138 IplImage* m_recipient;
\r
139 IplImage* m_auxImage;
\r
142 void* m_texture[3];
\r
145 IplImage* m_planes[3];
\r
154 #ifndef _DEBUG // debug version in StereoGRView.cpp
\r
155 inline CStereoGRDoc* CStereoGRView::GetDocument()
\r
156 { return (CStereoGRDoc*)m_pDocument; }
\r
159 /////////////////////////////////////////////////////////////////////////////
\r
161 //{{AFX_INSERT_LOCATION}}
\r
162 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
\r
164 #endif // !defined(AFX_STEREOGRVIEW_H__0603BB32_3287_4D21_ADCE_7B314B91C460__INCLUDED_)
\r