1 // AnimationView.h : interface of the CAnimationView3D class
3 /////////////////////////////////////////////////////////////////////////////
5 #if !defined(AFX_ANIMATIONVIEW3D_H__79840E88_1001_11D2_B8C1_0000F87A77C1_3D_INCLUDED_)
6 #define AFX_ANIMATIONVIEW3D_H__79840E88_1001_11D2_B8C1_0000F87A77C1_3D_INCLUDED_
10 #endif // _MSC_VER >= 1000
13 #include "AnimationDoc.h"
14 #include "..\..\Common\res\OCC_Resource.h"
18 enum View3D_CurrentAction {
19 CurrentAction3d_Nothing,
20 CurrentAction3d_DynamicZooming,
21 CurrentAction3d_WindowZooming,
22 CurrentAction3d_DynamicPanning,
23 CurrentAction3d_GlobalPanning,
24 CurrentAction3d_DynamicRotation,
29 class CAnimationView3D : public CView
31 protected: // create from serialization only
33 DECLARE_DYNCREATE(CAnimationView3D)
37 CAnimationDoc* GetDocument();
43 // ClassWizard generated virtual function overrides
44 //{{AFX_VIRTUAL(CAnimationView3D)
46 void FitAll() { if ( !myView.IsNull() ) myView->FitAll(); myView->ZFitAll(); };
47 virtual void OnDraw(CDC* pDC); // overridden to draw this view
48 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
49 virtual void OnInitialUpdate(); // CasCade
56 virtual ~CAnimationView3D();
58 virtual void AssertValid() const;
59 virtual void Dump(CDumpContext& dc) const;
61 void SetDimensions ();
64 void SetFocal (double theFocus, double theAngle);
65 void Fly (int x , int y);
66 void Turn (int x , int y);
67 void Roll (int x , int y);
68 void Twist (int x , int y);
76 // Generated message map functions
78 //{{AFX_MSG(CAnimationView3D)
79 afx_msg void OnBUTTONAxo();
80 afx_msg void OnBUTTONBack();
81 afx_msg void OnBUTTONBottom();
82 afx_msg void OnBUTTONFront();
83 afx_msg void OnBUTTONHlrOff();
84 afx_msg void OnBUTTONHlrOn();
85 afx_msg void OnBUTTONLeft();
86 afx_msg void OnBUTTONPan();
87 afx_msg void OnBUTTONPanGlo();
88 afx_msg void OnBUTTONReset();
89 afx_msg void OnBUTTONRight();
90 afx_msg void OnBUTTONRot();
91 afx_msg void OnBUTTONTop();
92 afx_msg void OnBUTTONZoomAll();
93 afx_msg void OnFileExportImage();
94 afx_msg void OnSize(UINT nType, int cx, int cy);
95 afx_msg void OnBUTTONZoomProg();
96 afx_msg void OnBUTTONZoomWin();
97 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
98 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
99 afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
100 afx_msg void OnMButtonUp(UINT nFlags, CPoint point);
101 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
102 afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
103 afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
104 afx_msg void OnUpdateBUTTONHlrOff(CCmdUI* pCmdUI);
105 afx_msg void OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI);
106 afx_msg void OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI);
107 afx_msg void OnUpdateBUTTONPan(CCmdUI* pCmdUI);
108 afx_msg void OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI);
109 afx_msg void OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI);
110 afx_msg void OnUpdateBUTTONRot(CCmdUI* pCmdUI);
112 afx_msg void OnChangeBackground();
113 afx_msg void OnTimer(UINT_PTR nIDEvent);
115 afx_msg void OnSensitivity();
116 afx_msg void OnBUTTONFly();
117 afx_msg void OnBUTTONTurn();
118 afx_msg void OnUpdateBUTTONFly(CCmdUI* pCmdUI);
119 afx_msg void OnUpdateBUTTONTurn(CCmdUI* pCmdUI);
120 afx_msg void OnViewDisplaystatus();
121 afx_msg void OnUpdateViewDisplaystatus(CCmdUI* pCmdUI);
125 afx_msg void OnStop();
126 afx_msg void OnRestart();
129 DECLARE_MESSAGE_MAP()
131 Handle(V3d_View) myView;
133 Handle(V3d_View)& GetView() { return myView;};
134 void DisplayTuneDialog();
136 Standard_Integer myXmin;
137 Standard_Integer myYmin;
138 Standard_Integer myXmax;
139 Standard_Integer myYmax;
140 Standard_Real myCurZoom;
141 Standard_Boolean myHlrModeIsOn;
143 View3D_CurrentAction myCurrentMode;
144 double m_Atx , m_Aty , m_Atz ;
145 double m_Eyex , m_Eyey , m_Eyez ;
151 Handle(AIS_RubberBand) myRect; //!< Rubber rectangle for selection
152 void DrawRectangle (Standard_Integer theMinX, Standard_Integer theMinY, Standard_Integer theMaxX, Standard_Integer theMaxY,
153 Standard_Boolean theToDraw, Aspect_TypeOfLine theLineType = Aspect_TOL_SOLID);
156 #ifndef _DEBUG // debug version in AnimationView.cpp
157 inline CAnimationDoc* CAnimationView3D::GetDocument()
158 { return (CAnimationDoc*)m_pDocument; }
161 /////////////////////////////////////////////////////////////////////////////
163 //{{AFX_INSERT_LOCATION}}
164 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
166 #endif // !defined(AFX_ANIMATIONVIEW3D_H__79840E88_1001_11D2_B8C1_0000F87A77C1_3D_INCLUDED_)