OSGView.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /**************************************************************************************************
  2. 版本所有(C), 2020-2022, 北京普达迪泰
  3. ***************************************************************************************************
  4. 文 件 名: OSGView.h
  5. 功能描述: OSG视图封装类
  6. 版 本 号: 1.00初版
  7. 作 者: HYF
  8. 生成日期; 2021-12-20
  9. 最近修改:
  10. 函数列表:
  11. 修改历史:
  12. 1.日 期 :2021-12-20
  13. 作 者 : HYF
  14. 修改内容 : 创建文件
  15. **************************************************************************************************/
  16. #pragma once
  17. using namespace std;
  18. #include <vector>
  19. // OSGView 视图
  20. class CoreOSG;
  21. class RenderingThread;
  22. class OSGView : public CView
  23. {
  24. DECLARE_DYNCREATE(OSGView)
  25. public:
  26. // 动态创建所使用的受保护的构造函数
  27. OSGView();
  28. virtual ~OSGView();
  29. protected:
  30. CStringArray m_arrModel;
  31. CoreOSG *m_pOSG;
  32. RenderingThread* m_pRenderThread;
  33. public:
  34. // 重写以绘制该视图
  35. virtual void OnDraw(CDC* pDC);
  36. #ifdef _DEBUG
  37. virtual void AssertValid() const;
  38. #ifndef _WIN32_WCE
  39. virtual void Dump(CDumpContext& dc) const;
  40. #endif
  41. #endif
  42. protected:
  43. DECLARE_MESSAGE_MAP()
  44. public:
  45. BOOL LoadOSG(LPCTSTR szEquipTypeCode, CStringArray& arrModel);
  46. void Terminate();
  47. void RotateCurModel(const double fx, const double fy, const double fz);
  48. void SetCurEquipPlace(LPCTSTR szEquipPlace);
  49. public:
  50. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  51. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  52. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  53. afx_msg void OnDestroy();
  54. virtual void OnInitialUpdate();
  55. };