Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CameraDlg.h
1 //
2 // Name: CameraDlg.h
3 //
4 // Copyright (c) 2001-2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #ifndef __CameraDlg_H__
9 #define __CameraDlg_H__
10 
11 #include "EnviroUI.h"
12 #include "vtui/AutoDialog.h"
13 
14 // WDR: class declarations
15 
16 //----------------------------------------------------------------------------
17 // CameraDlg
18 //----------------------------------------------------------------------------
19 
20 class CameraDlg: public CameraDlgBase
21 {
22 public:
23  // constructors and destructors
24  CameraDlg( wxWindow *parent, wxWindowID id, const wxString &title,
25  const wxPoint& pos = wxDefaultPosition,
26  const wxSize& size = wxDefaultSize,
27  long style = wxDEFAULT_DIALOG_STYLE );
28 
29  // WDR: method declarations for CameraDlg
30  wxStaticText* GetFovText() { return (wxStaticText*) FindWindow( ID_FOV_TEXT ); }
31  wxCheckBox* GetAccel() { return (wxCheckBox*) FindWindow( ID_ACCEL ); }
32  wxSlider* GetFusionDistSlider() { return (wxSlider*) FindWindow( ID_FUSION_DIST_SLIDER ); }
33  wxTextCtrl* GetFusionDist() { return (wxTextCtrl*) FindWindow( ID_FUSION_DIST ); }
34  wxSlider* GetEyeSepSlider() { return (wxSlider*) FindWindow( ID_EYE_SEPSLIDER ); }
35  wxTextCtrl* GetEyeSep() { return (wxTextCtrl*) FindWindow( ID_EYE_SEP ); }
36  wxSlider* GetFovSlider() { return (wxSlider*) FindWindow( ID_FOVSLIDER ); }
37  wxTextCtrl* GetFov() { return (wxTextCtrl*) FindWindow( ID_FOV ); }
38  wxChoice* GetSpeedUnits() { return (wxChoice*) FindWindow( ID_SPEED_UNITS ); }
39  void SlidersToValues(int w);
40  void ValuesToSliders();
41  void GetValues();
42  void SetValues();
43  void TransferToWindow();
44  void SetSliderControls();
45 
46  void CameraChanged();
47  void CheckAndUpdatePos();
48 
49 private:
50  // WDR: member variable declarations for CameraDlg
51  wxString m_camX, m_camY, m_camZ, m_camWidth;
52 
53  int m_iFov;
54  int m_iNear;
55  int m_iFar;
56  int m_iEyeSep;
57  int m_iFusionDist;
58  int m_iSpeed;
59  int m_iDistVeg;
60  int m_iDistStruct;
61  int m_iDistRoad;
62 
63  bool m_bAccel;
64  int m_iSpeedUnits;
65 
66  float m_fFov;
67  float m_fNear;
68  float m_fFar;
69  float m_fEyeSep;
70  float m_fFusionDist;
71  float m_fSpeed;
72  float m_fDistVeg;
73  float m_fDistStruct;
74  float m_fDistRoad;
75 
76  bool m_bSet;
77  DPoint3 m_pos;
78  bool m_bOrtho;
79 
80 private:
81  // WDR: handler declarations for CameraDlg
82  void OnAccel( wxCommandEvent &event );
83  void OnSpeedUnits( wxCommandEvent &event );
84  void OnSpeedSlider( wxCommandEvent &event );
85  void OnFarSlider( wxCommandEvent &event );
86  void OnEyeSepSlider( wxCommandEvent &event );
87  void OnFusionDistSlider( wxCommandEvent &event );
88  void OnNearSlider( wxCommandEvent &event );
89  void OnFovSlider( wxCommandEvent &event );
90 
91  void OnSliderVeg( wxCommandEvent &event );
92  void OnSliderStruct( wxCommandEvent &event );
93  void OnSliderRoad( wxCommandEvent &event );
94 
95  void OnText( wxCommandEvent &event );
96  void OnTextEnter( wxCommandEvent &event );
97  void OnInitDialog(wxInitDialogEvent& event);
98 
99 private:
100  DECLARE_EVENT_TABLE()
101 };
102 
103 #endif // __CameraDlg_H__