TIFFView.h
上传用户:lbr_007
上传日期:2019-05-31
资源大小:282k
文件大小:4k
- // TIFFView.h : interface of the TIFFView class
- //
- /////////////////////////////////////////////////////////////////////////////
- #if !defined(AFX_TIFFVIEW_H__FDF19EE0_643F_4117_AC68_91332826153B__INCLUDED_)
- #define AFX_TIFFVIEW_H__FDF19EE0_643F_4117_AC68_91332826153B__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "TIFFDirDLG.h"
- #include <dibsect.h>
- #include <utmproj.h>
- #include <Earth3D.h>
- #include <Matrix3D.h>
- class ClickPoint {
- public:
- double m_lat;
- double m_lon;
- double m_alt;
- std::string m_name;
- ClickPoint(void){ m_lat = m_lon = m_alt = 0.0;}
- ClickPoint(double lat, double lon, const char * name, double alt = 1000.0)
- {
- m_lat = lat;
- m_lon = lon;
- m_name = name;
- m_alt = alt;
- }
- ClickPoint(const ClickPoint& pt){ Copy(pt);}
- ~ClickPoint(void){}
- void Copy(const ClickPoint& pt)
- {
- m_lat = pt.m_lat;
- m_lon = pt.m_lon;
- m_name = pt.m_name;
- m_alt = pt.m_alt;
- }
- ClickPoint& operator = (const ClickPoint& pt)
- {
- Copy(pt);
- return *this;
- }
- };
- class V3D {
- public:
- double m_x, m_y, m_z;
- V3D(void){ m_x = m_y = m_z = 0.0;}
- V3D(const V3D& v){ m_x = v.m_x; m_y = v.m_y; m_z = v.m_z;}
- V3D(double x, double y, double z){ m_x = x; m_y = y; m_z = z;}
- void Copy(const V3D& v){ m_x = v.m_x; m_y = v.m_y; m_z = v.m_z;}
- V3D& operator = (const V3D& v){ Copy(v); return *this;}
- };
- class TIFFView : public CScrollView
- {
- protected: // create from serialization only
- TIFFView();
- DECLARE_DYNCREATE(TIFFView)
- // Attributes
- TIFFDirDLG m_dlg;
- int m_shownImage;
- bool m_leftDown;
- CPoint m_clickPoint;
- CSize m_cs;
- GEORef m_gr;
- bool m_isGeo;
- char m_status1[80];
- char m_status2[80];
- char m_status3[80];
- char m_status[80];
- UTMProjection m_utmProj;
- double m_scaleFactor;
- DIBSection m_viewDIB;
- bool m_view2D;
- bool m_registrationMode;
- CPoint m_registrationPt;
- Earth3D m_earth3D;
- Matrix3D m_view_matrix;
- std::vector<ClickPoint> m_pts;
- UINT32 m_flyTimer;
- UINT32 m_flyStart;
- UINT32 m_flyDuration;
- bool m_flyFirstPerson;
- std::vector<V3D> m_flyWayPoints;
- UINT32 m_totalFrames;
- public:
- TIFFDoc* GetDocument();
- void ShowImage(void);
- void PlotClickPoints(CClientDC& dc);
- void SetImage(UINT32 ndx);
- void StretchImage(double scale_factor);
- void Stretched2Unstretched(int xin, int yin, int& xout, int& yout);
- std::vector<ClickPoint>& GetClickPoints(void){ return m_pts;}
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(TIFFView)
- public:
- virtual void OnDraw(CDC* pDC); // overridden to draw this view
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- protected:
- virtual void OnInitialUpdate(); // called first time after construct
- 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 ~TIFFView();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected:
- // Generated message map functions
- protected:
- //{{AFX_MSG(TIFFView)
- 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 OnUpdateImageList(CCmdUI* pCmdUI);
- afx_msg void OnImageList();
- afx_msg void OnUpdateView2D(CCmdUI* pCmdUI);
- afx_msg void OnView2D();
- afx_msg void OnUpdateView3D(CCmdUI* pCmdUI);
- afx_msg void OnView3D();
- afx_msg void OnUpdateRegistration(CCmdUI* pCmdUI);
- afx_msg void OnRegistration();
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg void OnUpdateToolsFly(CCmdUI* pCmdUI);
- afx_msg void OnToolsFly();
- afx_msg void OnTimer(UINT nIDEvent);
- afx_msg void OnUpdateViewStopflight(CCmdUI* pCmdUI);
- afx_msg void OnViewStopflight();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- #ifndef _DEBUG // debug version in TIFFView.cpp
- inline TIFFDoc* TIFFView::GetDocument()
- { return (TIFFDoc*)m_pDocument; }
- #endif
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_TIFFVIEW_H__FDF19EE0_643F_4117_AC68_91332826153B__INCLUDED_)