Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
LODDlg.h
1 //
2 // LODDlg.h
3 //
4 // Copyright (c) 2005-2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #ifndef __LODDlg_H__
9 #define __LODDlg_H__
10 
11 #include "EnviroUI.h"
12 #include "vtui/AutoDialog.h"
13 
14 class EnviroFrame;
15 class vtTiledGeom;
16 class vtCamera;
18 
19 // WDR: class declarations
20 
21 //----------------------------------------------------------------------------
22 // LODDlg
23 //----------------------------------------------------------------------------
24 
25 class LODDlg: public PagingDlgBase
26 {
27 public:
28  // constructors and destructors
29  LODDlg( wxWindow *parent, wxWindowID id, const wxString &title,
30  const wxPoint& pos = wxDefaultPosition,
31  const wxSize& size = wxDefaultSize,
32  long style = wxDEFAULT_DIALOG_STYLE );
33 
34  // WDR: method declarations for LODDlg
35  wxTextCtrl* GetTileStatus() { return (wxTextCtrl*) FindWindow( ID_TILE_STATUS ); }
36  wxSpinCtrl* GetTarget() { return (wxSpinCtrl*) FindWindow( ID_TARGET ); }
37  wxTextCtrl* GetCurrent() { return (wxTextCtrl*) FindWindow( ID_CURRENT ); }
38  wxPanel* GetPanel1() { return (wxPanel*) FindWindow( ID_PANEL1 ); }
39  wxPanel* GetPanel2() { return (wxPanel*) FindWindow( ID_PANEL2 ); }
40  wxPanel* GetPanel3() { return (wxPanel*) FindWindow( ID_PANEL3 ); }
41  wxNotebook *GetNotebook() { return (wxNotebook*) FindWindow( ID_NOTEBOOK ); }
42 
43  void Refresh(float res0, float res, float res1, int target, int count,
44  float prange);
45  void DrawLODChart(float res0, float res, float res1, int target, int count);
46  void DrawTilesetState(vtTiledGeom *tg, vtCamera *cam);
47  void DrawStructureState(vtPagedStructureLodGrid *grid, float fPageOutDist);
48  void SetFrame(EnviroFrame *pFrame) { m_pFrame = pFrame; }
49  void SetPagingRange(float fmin, float fmax);
50 
51 private:
52  // WDR: member variable declarations for LODDlg
53  bool m_bHaveRange;
54  bool m_bHaveRangeVal;
55  bool m_bSet;
56  int m_iTarget;
57  EnviroFrame *m_pFrame;
58  int m_iRange;
59  float m_fRange;
60  int m_iPageout;
61  float m_fPageout;
62  int m_iCountCur;
63  int m_iCountMax;
64 
65  void SlidersToValues();
66  void ValuesToSliders();
67 
68 private:
69  // WDR: handler declarations for LODDlg
70  void OnSpinTargetUp( wxSpinEvent &event );
71  void OnSpinTargetDown( wxSpinEvent &event );
72  void OnText( wxCommandEvent &event );
73  void OnTarget( wxCommandEvent &event );
74  void OnRangeSlider( wxCommandEvent &event );
75  void OnInitDialog(wxInitDialogEvent& event);
76 
77 private:
78  DECLARE_EVENT_TABLE()
79 };
80 
81 #endif // __LODDlg_H__