MyglDoc.h
上传用户:cding2008
上传日期:2007-01-03
资源大小:1812k
文件大小:6k
源码类别:

OpenGL

开发平台:

Visual C++

  1. /////////////////////////////////////////////////////////////////////////////
  2. // MyglDoc.h : Header file; interface of the CMyglDoc class
  3. //
  4. // ModelMagic 3D and 'glOOP' (OpenGL Object Oriented Programming library)
  5. // Copyright (c) Craig Fahrnbach 1997, 1999
  6. //
  7. // OpenGL is a registered trademark of Silicon Graphics
  8. //
  9. //
  10. // This program is provided for educational and personal use only and
  11. // is provided without guarantee or warrantee expressed or implied.
  12. //
  13. // Commercial use is strickly prohibited without written permission
  14. // from ImageWare Development.
  15. //
  16. /////////////////////////////////////////////////////////////////////////////
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CMyglDoc document
  19. class CMyglDoc : public CDocument
  20. {
  21. DECLARE_DYNCREATE(CMyglDoc)
  22. // Construction
  23. public:
  24. HGLOBAL m_hDevNames;
  25. HGLOBAL m_hDevMode;
  26. void SetPrinterDeviceDefaults();
  27. CMyglDoc();
  28. virtual ~CMyglDoc();
  29. // Methods / Implementation
  30. public:
  31. void UserSelectedAnObject();
  32. protected:
  33. void ResetSelectionFlags();
  34. void ResetCommandFlags();
  35. // Attributes
  36. public:
  37. C3dWorld* m_pWorld;
  38. double m_dTime;
  39. HCURSOR m_hCursorPrev;
  40. HCURSOR m_hPaintCursor;
  41. // Model selection flags
  42. BOOL m_bSelectCamera;
  43. BOOL m_bSelectParentObj;
  44. BOOL m_bSelectChildObj;
  45. BOOL m_bSelectPoint;
  46. // Model Object selection flags
  47. BOOL m_bSelectObjAxis;
  48. BOOL m_bSelectObjTexture;
  49. BOOL m_bSelectObjTextureAxis;
  50. BOOL m_bSelectObjPoints;
  51. BOOL m_bSelectObjEdges;
  52. // Model Command flags
  53. BOOL m_bSelect;
  54. BOOL m_bMove;
  55. BOOL m_bRotate;
  56. BOOL m_bScale;
  57. BOOL m_bPaint;
  58. BOOL m_bCreatePoints;
  59. // Model Coordinate flags
  60. BOOL m_bUnLockXAxis;
  61. BOOL m_bUnLockYAxis;
  62. BOOL m_bUnLockZAxis;
  63. BOOL m_bObjectCoordinates;
  64. BOOL m_bWorldCoordinates;
  65. // Misc flags
  66. BOOL m_bSnapToGrid;
  67. protected:
  68. // Operations
  69. public:
  70. // Overrides
  71. // ClassWizard generated virtual function overrides
  72. //{{AFX_VIRTUAL(CMyglDoc)
  73. public:
  74. virtual BOOL OnNewDocument();
  75. virtual void Serialize(CArchive& ar);
  76. virtual void OnCloseDocument();
  77. virtual void SetTitle(LPCTSTR lpszTitle);
  78. //}}AFX_VIRTUAL
  79. // Implementation
  80. public:
  81. #ifdef _DEBUG
  82. virtual void AssertValid() const;
  83. virtual void Dump(CDumpContext& dc) const;
  84. #endif
  85. protected:
  86. void AddObject(C3dObject* pObject);
  87. // Generated message map functions
  88. protected:
  89. //{{AFX_MSG(CMyglDoc)
  90. afx_msg void OnMatlSave();
  91. afx_msg void OnMatlOpen();
  92. afx_msg void OnObjectOpen();
  93. afx_msg void OnObjectSaveAs();
  94. afx_msg void OnObjectNewCube();
  95. afx_msg void OnObjectNewCone();
  96. afx_msg void OnObjectNewCylinder();
  97. afx_msg void OnObjectNewCSG();
  98. afx_msg void OnObjectNewTorus();
  99. afx_msg void OnObjectNewPlane();
  100. afx_msg void OnObjectNewSphere();
  101. afx_msg void OnObjectNewTTF();
  102. afx_msg void OnObjectNewLathe();
  103. afx_msg void OnObjectNewDisk();
  104. afx_msg void OnObjectNewGrid();
  105. afx_msg void OnObjectNewTriangle();
  106. afx_msg void OnSnapToGrid();
  107. afx_msg void OnUpdateSnapToGrid(CCmdUI* pCmdUI);
  108. afx_msg void OnAnimateFly();
  109. afx_msg void OnUpdateAnimateFly(CCmdUI* pCmdUI);
  110. afx_msg void OnKeyframePlay();
  111. afx_msg void OnKeyframeFirst();
  112. afx_msg void OnUpdateKeyframeFirst(CCmdUI* pCmdUI);
  113. afx_msg void OnKeyframeLast();
  114. afx_msg void OnUpdateKeyframeLast(CCmdUI* pCmdUI);
  115. afx_msg void OnKeyframeNext();
  116. afx_msg void OnUpdateKeyframeNext(CCmdUI* pCmdUI);
  117. afx_msg void OnUpdateKeyframePlay(CCmdUI* pCmdUI);
  118. afx_msg void OnKeyframePrevious();
  119. afx_msg void OnUpdateKeyframePrevious(CCmdUI* pCmdUI);
  120. afx_msg void OnKeyframeRecord();
  121. afx_msg void OnUpdateKeyframeRecord(CCmdUI* pCmdUI);
  122. afx_msg void OnKeyframeUnrecord();
  123. afx_msg void OnUpdateKeyframeUnrecord(CCmdUI* pCmdUI);
  124. afx_msg void OnTextureOpen();
  125. afx_msg void OnTextureEdit();
  126. afx_msg void OnTextureRemove();
  127. afx_msg void OnObjectNewNurb();
  128. afx_msg void OnObjectNewTerrain();
  129. afx_msg void OnSelectCamera();
  130. afx_msg void OnUpdateSelectCamera(CCmdUI* pCmdUI);
  131. afx_msg void OnSelectParent();
  132. afx_msg void OnUpdateSelectParent(CCmdUI* pCmdUI);
  133. afx_msg void OnSelectChild();
  134. afx_msg void OnUpdateSelectChild(CCmdUI* pCmdUI);
  135. afx_msg void OnSelectObjectAxis();
  136. afx_msg void OnUpdateSelectObjectAxis(CCmdUI* pCmdUI);
  137. afx_msg void OnSelectObjectTexture();
  138. afx_msg void OnUpdateSelectObjectTexture(CCmdUI* pCmdUI);
  139. afx_msg void OnSelectObjectTextureAxis();
  140. afx_msg void OnUpdateSelectObjectTextureAxis(CCmdUI* pCmdUI);
  141. afx_msg void OnSelectObjectEdges();
  142. afx_msg void OnUpdateSelectObjectEdges(CCmdUI* pCmdUI);
  143. afx_msg void OnSelectObjectPoints();
  144. afx_msg void OnUpdateSelectObjectPoints(CCmdUI* pCmdUI);
  145. afx_msg void OnSelectPoints();
  146. afx_msg void OnUpdateSelectPoints(CCmdUI* pCmdUI);
  147. afx_msg void OnCommandSelect();
  148. afx_msg void OnUpdateCommandSelect(CCmdUI* pCmdUI);
  149. afx_msg void OnCommandMove();
  150. afx_msg void OnUpdateCommandMove(CCmdUI* pCmdUI);
  151. afx_msg void OnCommandRotate();
  152. afx_msg void OnUpdateCommandRotate(CCmdUI* pCmdUI);
  153. afx_msg void OnCommandScale();
  154. afx_msg void OnUpdateCommandScale(CCmdUI* pCmdUI);
  155. afx_msg void OnCommandPaint();
  156. afx_msg void OnUpdateCommandPaint(CCmdUI* pCmdUI);
  157. afx_msg void OnCommandPointsCreate();
  158. afx_msg void OnUpdateCommandPointsCreate(CCmdUI* pCmdUI);
  159. afx_msg void OnCoordinateXAxis();
  160. afx_msg void OnUpdateCoordinateXAxis(CCmdUI* pCmdUI);
  161. afx_msg void OnCoordinateYAxis();
  162. afx_msg void OnUpdateCoordinateYAxis(CCmdUI* pCmdUI);
  163. afx_msg void OnCoordinateZAxis();
  164. afx_msg void OnUpdateCoordinateZAxis(CCmdUI* pCmdUI);
  165. afx_msg void OnCoordinateObject();
  166. afx_msg void OnUpdateCoordinateObject(CCmdUI* pCmdUI);
  167. afx_msg void OnCoordinateWorld();
  168. afx_msg void OnUpdateCoordinateWorld(CCmdUI* pCmdUI);
  169. afx_msg void OnObjectNewLight();
  170. afx_msg void OnObjectNewHSpline();
  171. afx_msg void OnObjectNewCloud();
  172. //}}AFX_MSG
  173. DECLARE_MESSAGE_MAP()
  174. };
  175. /////////////////////////////////////////////////////////////////////////////