1 // Viewer3dDoc.h : interface of the CViewer3dDoc class
3 /////////////////////////////////////////////////////////////////////////////
5 #if !defined(AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_)
6 #define AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_
10 #endif // _MSC_VER >= 1000
12 #include "OCCDemo_Presentation.h"
13 #include "OffsetDlg.h"
14 #include "OCC_3dDoc.h"
15 #include "ResultDialog.h"
16 #include "User_Cylinder.hxx"
19 #include <AIS_Trihedron.hxx>
20 #include <AIS_InteractiveContext.hxx>
21 #include <V3d_Viewer.hxx>
24 class OCCDemo_Presentation;
26 class CViewer3dDoc : public OCC_3dDoc
28 DECLARE_DYNCREATE(CViewer3dDoc)
30 protected: // create from serialization only
32 void InitViewButtons();
36 void SetMyStaticTrihedronAxisIsDisplayed(BOOL IsDisplayed);
37 Handle(AIS_Shape) GetBox();
38 Handle(AIS_Shape) GetSphere();
39 Handle(User_Cylinder) GetCylinder();
40 Handle(AIS_Shape) GetOverlappedBox();
41 Handle(AIS_Shape) GetOverlappedSphere();
42 Handle(AIS_Shape) GetOverlappedCylinder();
44 Standard_CString GetDataDir() {return myDataDir;}
47 virtual ~CViewer3dDoc();
48 void UpdateResultMessageDlg (CString theTitle, const TCollection_AsciiString& theMessage);
49 void UpdateResultMessageDlg (CString theTitle, CString theMessage);
50 virtual BOOL OnNewDocument();
51 virtual void Popup (const Standard_Integer x,
52 const Standard_Integer y,
53 const Handle(V3d_View)& aView);
55 virtual void DragEvent (const Standard_Integer x,
56 const Standard_Integer y,
57 const Standard_Integer TheState,
58 const Handle(V3d_View)& aView);
60 virtual void InputEvent (const Standard_Integer x,
61 const Standard_Integer y,
62 const Handle(V3d_View)& aView);
64 virtual void ShiftDragEvent (const Standard_Integer x,
65 const Standard_Integer y,
66 const Standard_Integer TheState,
67 const Handle(V3d_View)& aView);
69 virtual void ShiftInputEvent (const Standard_Integer x,
70 const Standard_Integer y,
71 const Handle(V3d_View)& aView);
74 virtual void AssertValid() const;
75 virtual void Dump(CDumpContext& dc) const;
78 // Generated message map functions
80 BOOL myStaticTrihedronAxisIsDisplayed;
81 //{{AFX_MSG(CViewer3dDoc)
83 afx_msg void OnCylinder();
84 afx_msg void OnSphere();
85 afx_msg void OnRemoveAll();
86 afx_msg void OnNbisos();
87 afx_msg void OnFaces();
88 afx_msg void OnEdges();
89 afx_msg void OnVertices();
90 afx_msg void OnNeutral();
91 afx_msg void OnUsercylinderChangefacecolor();
92 afx_msg void OnFillet3d();
93 afx_msg void OnCircle();
94 afx_msg void OnLine();
95 afx_msg void OnOverlappedBox();
96 afx_msg void OnOverlappedCylinder();
97 afx_msg void OnOverlappedSphere();
98 afx_msg void OnPolygonOffsets();
99 afx_msg void OnUpdatePolygonOffsets(CCmdUI* pCmdUI);
100 afx_msg void OnUpdateCylinder(CCmdUI* pCmdUI);
101 afx_msg void OnUpdateSphere(CCmdUI* pCmdUI);
102 afx_msg void OnUpdateBox(CCmdUI* pCmdUI);
103 afx_msg void OnUpdateOverlappedCylinder(CCmdUI* pCmdUI);
104 afx_msg void OnUpdateOverlappedSphere(CCmdUI* pCmdUI);
105 afx_msg void OnUpdateOverlappedBox(CCmdUI* pCmdUI);
106 afx_msg void OnObjectRemove();
107 afx_msg void OnObjectErase();
108 afx_msg void OnObjectDisplayall();
109 afx_msg void OnObjectColoredMesh();
110 afx_msg void OnUpdateObjectColoredMesh(CCmdUI* pCmdUI);
111 afx_msg void OnUpdateObjectShading(CCmdUI* pCmdUI);
112 afx_msg void OnUpdateObjectWireframe(CCmdUI* pCmdUI);
113 afx_msg void OnOptionsTrihedronDynamicTrihedron();
114 afx_msg void OnUpdateOptionsTrihedronDynamicTrihedron(CCmdUI* pCmdUI);
115 afx_msg void OnUpdateOptionsTrihedronStaticTrihedron(CCmdUI* pCmdUI);
116 afx_msg void OnTextureOn();
117 afx_msg void OnBUTTONNext();
118 afx_msg void OnBUTTONStart();
119 afx_msg void OnBUTTONRepeat();
120 afx_msg void OnBUTTONPrev();
121 afx_msg void OnBUTTONEnd();
122 afx_msg void OnUpdateBUTTONNext(CCmdUI* pCmdUI);
123 afx_msg void OnUpdateBUTTONPrev(CCmdUI* pCmdUI);
124 afx_msg void OnUpdateBUTTONStart(CCmdUI* pCmdUI);
125 afx_msg void OnUpdateBUTTONRepeat(CCmdUI* pCmdUI);
126 afx_msg void OnUpdateBUTTONEnd(CCmdUI* pCmdUI);
127 afx_msg void OnFileNew();
128 afx_msg void OnBUTTONShowResult();
129 afx_msg void OnDumpView();
131 DECLARE_MESSAGE_MAP()
138 COffsetDlg* myOffsetDlg;
140 Handle(User_Cylinder) myCylinder;
141 Handle(AIS_Shape) mySphere;
142 Handle(AIS_Shape) myBox;
143 Handle(AIS_Shape) myOverlappedCylinder;
144 Handle(AIS_Shape) myOverlappedSphere;
145 Handle(AIS_Shape) myOverlappedBox;
146 Handle(AIS_Trihedron) myTrihedron;
148 OCCDemo_Presentation *myPresentation;
149 char myDataDir[5]; // for "Data\0"
150 char myLastPath[MAX_PATH]; // directory of lastly saved file in DumpView()
151 bool isTextureSampleStarted;
154 /////////////////////////////////////////////////////////////////////////////
156 //{{AFX_INSERT_LOCATION}}
157 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
159 #endif // !defined(AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_)