VisualDoc.h
Upload User: fjejplh001
Upload Date: 2007-06-11
Package Size: 324k
Code Size: 6k
Category:

3D Graphic

Development Platform:

Visual C++

  1. // VisualDoc.h : interface of the CVisualDoc class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_VISUALDOC_H__253169CE_E77A_428A_B880_7B3BE80FE4C0__INCLUDED_)
  5. #define AFX_VISUALDOC_H__253169CE_E77A_428A_B880_7B3BE80FE4C0__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "BM.h"
  10. #include "DrawBM.h"
  11. #include "CGM.h"
  12. #include "DrawCGM.h"
  13. #include "GZGM.h"
  14. #include "DrawGZGM.h"
  15. #include "JGM.h"
  16. #include "DrawJGM.h"
  17. #include "JGM1.h"
  18. #include "DrawJGM1.h"
  19. #include "TM.h"
  20. #include "DrawTM.h"
  21. #include "YZM.h"
  22. #include "YTM.h"
  23. #include "DrawYTM.h"
  24. #include "DrawYZM.h"
  25. #include "YZM1.h"
  26. #include "DrawYZM1.h"
  27. #include "ModifyClip.h"
  28. #include "BackgroundColor.h"
  29. class CVisualView;
  30. class CVisualDoc : public CDocument
  31. {
  32. protected: // create from serialization only
  33. CVisualDoc();
  34. DECLARE_DYNCREATE(CVisualDoc)
  35. CTypedPtrArray<CObArray,CBM*>m_BMArray;
  36. CTypedPtrArray<CObArray,CCGM*>m_CGMArray;
  37. CTypedPtrArray<CObArray,CGZGM*>m_GZGMArray;
  38. CTypedPtrArray<CObArray,CJGM*>m_JGMArray;
  39. CTypedPtrArray<CObArray,CJGM1*>m_JGM1Array;
  40. CTypedPtrArray<CObArray,CTM*>m_TMArray;
  41. CTypedPtrArray<CObArray,CYTM*>m_YTMArray;
  42. CTypedPtrArray<CObArray,CYZM*>m_YZMArray;
  43. CTypedPtrArray<CObArray,CYZM1*>m_YZM1Array;
  44. // Attributes
  45. public:
  46. CVisualView* m_pView;  //指向视CCAGDView,在其OnCreate()时
  47.   BOOL    m_bAntiAlias;  //是否启用反走样
  48.   BOOL    m_bRenderSolid;//画图方式,是实体式还是线框式
  49. BOOL m_bDrawAxis;   //是否画坐标系
  50. BOOL    m_bLighting;   //是否启用光照
  51. // Operations
  52. public:
  53. // Overrides
  54. // ClassWizard generated virtual function overrides
  55. //{{AFX_VIRTUAL(CVisualDoc)
  56. public:
  57. virtual BOOL OnNewDocument();
  58. virtual void Serialize(CArchive& ar);
  59. //}}AFX_VIRTUAL
  60. // Implementation
  61. public:
  62. int GetNumYTM();
  63. void DeleteYTM();
  64. void AddYTM(double m_YTMx, double m_YTMy, double m_YTMz, double m_YTMr0, double m_YTMR, double m_YTMh, double m_YTMRX, double m_YTMRY, double m_YTMRZ, float m_YTMCR, float m_YTMCG, float m_YTMCB);
  65. int GetNumYZM1();
  66. void DeleteYZM1();
  67. void AddYZM1(double m_YZM1x, double m_YZM1y, double m_YZM1z, double m_YZM1r, double m_YZM1h, double m_YZM1RX, double m_YZM1RY, double m_YZM1RZ, float m_YZM1CR, float m_YZM1CG, float m_YZM1CB);
  68. int GetNumYZM();
  69. void DeleteYZM();
  70. void AddYZM(double m_YZMx,double m_YZMy,double m_YZMz,double m_YZMr,double m_YZMh,double m_YZMRX,double m_YZMRY,double m_YZMRZ,float m_YZMCR,float m_YZMCG,float m_YZMCB);
  71. void AddBM(double m_BMx,double m_BMy,double m_BMz,double m_BMl,double m_BMw,double m_BMh,double m_BMRX,double m_BMRY,double m_BMRZ,float m_BMCR,float m_BMCG,float m_BMCB);
  72. void AddCGM(double m_CGMx,double m_CGMy,double m_CGMz,double m_CGMb,double m_CGMtw,double m_CGMt,double m_CGMh,double m_CGMl,double m_CGMRX,double m_CGMRY,double m_CGMRZ,float m_CGMCR,float m_CGMCG,float m_CGMCB);
  73. void AddGZGM(double m_GZGMx,double m_GZGMy,double m_GZGMz,double m_GZGMb,double m_GZGMtw,double m_GZGMt,double m_GZGMh,double m_GZGMl,double m_GZGMRX,double m_GZGMRY,double m_GZGMRZ,float m_GZGMCR,float m_GZGMCG,float m_GZGMCB);
  74. void AddJGM(double m_JGMx, double m_JGMy, double m_JGMz, double m_JGMb, double m_JGMt, double m_JGMl, double m_JGMRX, double m_JGMRY, double m_JGMRZ,float  m_JGMCR,float  m_JGMCG,float  m_JGMCB);
  75. void AddJGM1(double m_JGM1x, double m_JGM1y, double m_JGM1z, double m_JGM1B, double m_JGM1b0, double m_JGM1t,  double m_JGM1l, double m_JGM1RX,double m_JGM1RY, double m_JGM1RZ,float m_JGM1CR,float m_JGM1CG,float m_JGM1CB);
  76. void AddTM(double m_TMx,double m_TMy,double m_TMz,double m_TMb,double m_TMtw,double m_TMt,double m_TMh,double m_TMl,double m_TMRX,double m_TMRY,double m_TMRZ,float m_TMCR,float m_TMCG,float m_TMCB);
  77. void DeleteBM();
  78. void DeleteCGM();
  79. void DeleteGZGM();
  80. void DeleteJGM();
  81. void DeleteJGM1();
  82. void DeleteTM();
  83. int GetNumBM();
  84. int GetNumCGM();
  85. int GetNumGZGM();
  86. int GetNumJGM();
  87.   int GetNumJGM1();
  88.   int GetNumTM();
  89.  
  90. CBM* GetBM(int Index);
  91.     CCGM* GetCGM(int Index);
  92.     CGZGM* GetGZGM(int Index);
  93.     CJGM* GetJGM(int Index);
  94.     CJGM1* GetJGM1(int Index);
  95.     CTM* GetTM(int Index);
  96.     CYTM* GetYTM(int Index);
  97.     CYZM* GetYZM(int Index);
  98.     CYZM1* GetYZM1(int Index);
  99. virtual ~CVisualDoc();
  100. #ifdef _DEBUG
  101. virtual void AssertValid() const;
  102. virtual void Dump(CDumpContext& dc) const;
  103. #endif
  104. protected:
  105. // Generated message map functions
  106. protected:
  107. //{{AFX_MSG(CVisualDoc)
  108. afx_msg void OnAddBm();
  109. afx_msg void OnAddJgm();
  110. afx_msg void OnAddCgm();
  111. afx_msg void OnAddGzgm();
  112. afx_msg void OnAddTm();
  113. afx_msg void OnAddJgm1();
  114. afx_msg void OnUndoBm();
  115. afx_msg void OnUndoCgm();
  116. afx_msg void OnUndoGzgm();
  117. afx_msg void OnUndoJgm();
  118. afx_msg void OnUndoJgm1();
  119. afx_msg void OnUndoTm();
  120. afx_msg void OnClip();
  121. afx_msg void OnAddYzm();
  122. afx_msg void OnUndoYzm();
  123. afx_msg void OnAddYzm1();
  124. afx_msg void OnUndoYzm1();
  125. afx_msg void OnAddYtm();
  126. afx_msg void OnUndoYtm();
  127. afx_msg void OnBackgroundBlack();
  128. afx_msg void OnBackgroundWhite();
  129. afx_msg void OnUpdateBackgroundBlack(CCmdUI* pCmdUI);
  130. afx_msg void OnUpdateBackgroundWhite(CCmdUI* pCmdUI);
  131. afx_msg void OnBackgroundYellow();
  132. afx_msg void OnBackgroundIndigotic();
  133. afx_msg void OnBackgroundFuchsine();
  134. afx_msg void OnUpdateBackgroundYellow(CCmdUI* pCmdUI);
  135. afx_msg void OnUpdateBackgroundIndigotic(CCmdUI* pCmdUI);
  136. afx_msg void OnUpdateBackgroundFuchsine(CCmdUI* pCmdUI);
  137. afx_msg void OnBackgroundSelfdefine();
  138. afx_msg void OnUpdateBackgroundSelfdefine(CCmdUI* pCmdUI);
  139. //}}AFX_MSG
  140. DECLARE_MESSAGE_MAP()
  141. };
  142. /////////////////////////////////////////////////////////////////////////////
  143. //{{AFX_INSERT_LOCATION}}
  144. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  145. #endif // !defined(AFX_VISUALDOC_H__253169CE_E77A_428A_B880_7B3BE80FE4C0__INCLUDED_)