0023791: Remove obsolete functionality - animation mode and degeneration presentation...
[occt.git] / samples / mfc / standard / 09_Animation / src / AnimationView3D.h
CommitLineData
7fd59977 1// AnimationView.h : interface of the CAnimationView3D class
2//
3/////////////////////////////////////////////////////////////////////////////
4
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_
7
8#if _MSC_VER >= 1000
9#pragma once
10#endif // _MSC_VER >= 1000
11
12#include "Tune.h"
13#include "AnimationDoc.h"
14#include "..\..\Common\res\OCC_Resource.h"
15
16enum View3D_CurrentAction {
17 CurrentAction3d_Nothing,
18 CurrentAction3d_DynamicZooming,
19 CurrentAction3d_WindowZooming,
20 CurrentAction3d_DynamicPanning,
21 CurrentAction3d_GlobalPanning,
22 CurrentAction3d_DynamicRotation,
23 CurrentAction3d_Fly,
24 CurrentAction3d_Turn
25};
26
27class CAnimationView3D : public CView
28{
29protected: // create from serialization only
30 CAnimationView3D();
31 DECLARE_DYNCREATE(CAnimationView3D)
32
33// Attributes
34public:
35 CAnimationDoc* GetDocument();
36
37// Operations
38public:
39
40// Overrides
41 // ClassWizard generated virtual function overrides
42 //{{AFX_VIRTUAL(CAnimationView3D)
43 public:
44 void FitAll() { if ( !myView.IsNull() ) myView->FitAll(); myView->ZFitAll(); };
45 virtual void OnDraw(CDC* pDC); // overridden to draw this view
46 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
47 virtual void OnInitialUpdate(); // CasCade
48 protected:
49
50 //}}AFX_VIRTUAL
51
52// Implementation
53public:
54 virtual ~CAnimationView3D();
55#ifdef _DEBUG
56 virtual void AssertValid() const;
57 virtual void Dump(CDumpContext& dc) const;
58#endif
59 void SetDimensions ();
60 void ReloadData();
61 CTune m_Tune;
62 void SetFocal ( double dFocus , double dAngle );
63 void Fly (int x , int y);
64 void Turn (int x , int y);
65 void Roll (int x , int y);
66 void Twist (int x , int y);
67
68protected:
69 double m_dAngle;
70 BOOL m_bShift;
71 int m_cx , m_cy ;
72 int m_curx , m_cury ;
73
74// Generated message map functions
75protected:
76 //{{AFX_MSG(CAnimationView3D)
77 afx_msg void OnBUTTONAxo();
78 afx_msg void OnBUTTONBack();
79 afx_msg void OnBUTTONBottom();
80 afx_msg void OnBUTTONFront();
81 afx_msg void OnBUTTONHlrOff();
82 afx_msg void OnBUTTONHlrOn();
83 afx_msg void OnBUTTONLeft();
84 afx_msg void OnBUTTONPan();
85 afx_msg void OnBUTTONPanGlo();
86 afx_msg void OnBUTTONReset();
87 afx_msg void OnBUTTONRight();
88 afx_msg void OnBUTTONRot();
89 afx_msg void OnBUTTONTop();
90 afx_msg void OnBUTTONZoomAll();
91 afx_msg void OnFileExportImage();
92 afx_msg void OnSize(UINT nType, int cx, int cy);
93 afx_msg void OnBUTTONZoomProg();
94 afx_msg void OnBUTTONZoomWin();
95 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
96 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
97 afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
98 afx_msg void OnMButtonUp(UINT nFlags, CPoint point);
99 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
100 afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
101 afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
102 afx_msg void OnUpdateBUTTONHlrOff(CCmdUI* pCmdUI);
103 afx_msg void OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI);
104 afx_msg void OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI);
105 afx_msg void OnUpdateBUTTONPan(CCmdUI* pCmdUI);
106 afx_msg void OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI);
107 afx_msg void OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI);
108 afx_msg void OnUpdateBUTTONRot(CCmdUI* pCmdUI);
109
110 afx_msg void OnChangeBackground();
111 afx_msg void OnTimer(UINT_PTR nIDEvent);
112
113 afx_msg void OnSensitivity();
114 afx_msg void OnBUTTONFly();
115 afx_msg void OnBUTTONTurn();
116 afx_msg void OnUpdateBUTTONFly(CCmdUI* pCmdUI);
117 afx_msg void OnUpdateBUTTONTurn(CCmdUI* pCmdUI);
118 afx_msg void OnViewDisplaystatus();
119 afx_msg void OnUpdateViewDisplaystatus(CCmdUI* pCmdUI);
120 //}}AFX_MSG
121
122public :
123 afx_msg void OnStop();
124 afx_msg void OnRestart();
125protected:
126
127 DECLARE_MESSAGE_MAP()
128private:
129 Handle_V3d_View myView;
130public:
131 Handle_V3d_View& GetView() { return myView;};
132 void DisplayTuneDialog();
133private:
de75ed09 134 Standard_Integer myXmin;
135 Standard_Integer myYmin;
136 Standard_Integer myXmax;
137 Standard_Integer myYmax;
138 Quantity_Factor myCurZoom;
139 Standard_Boolean myHlrModeIsOn;
140
141 Handle_V3d_PerspectiveView myPView;
142
143 View3D_CurrentAction myCurrentMode;
144 double m_Atx , m_Aty , m_Atz ;
145 double m_Eyex , m_Eyey , m_Eyez ;
146 double m_FlySens ;
147 double m_TurnSens ;
148 double m_Focus ;
7fd59977 149
150private:
151 enum LineStyle { Solid, Dot, ShortDash, LongDash, Default };
152 CPen* m_Pen;
153 virtual void DrawRectangle (const Standard_Integer MinX ,
154 const Standard_Integer MinY ,
155 const Standard_Integer MaxX ,
156 const Standard_Integer MaxY ,
157 const Standard_Boolean Draw ,
158 const LineStyle aLineStyle = Default );
159};
160
161#ifndef _DEBUG // debug version in AnimationView.cpp
162inline CAnimationDoc* CAnimationView3D::GetDocument()
163 { return (CAnimationDoc*)m_pDocument; }
164#endif
165
166/////////////////////////////////////////////////////////////////////////////
167
168//{{AFX_INSERT_LOCATION}}
169// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
170
171#endif // !defined(AFX_ANIMATIONVIEW3D_H__79840E88_1001_11D2_B8C1_0000F87A77C1_3D_INCLUDED_)