Changeset 407 for cafu/trunk
- Timestamp:
- 10/12/11 10:42:16 (7 months ago)
- Location:
- cafu/trunk
- Files:
-
- 3 modified
-
CaWE/ModelEditor/ChildFrame.cpp (modified) (6 diffs)
-
CaWE/ModelEditor/ChildFrame.hpp (modified) (3 diffs)
-
Libs/Models/Model_cmdl.hpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cafu/trunk/CaWE/ModelEditor/ChildFrame.cpp
r400 r407 100 100 m_ScenePropGrid(NULL), 101 101 m_SubmodelsPanel(NULL), 102 m_DlodModelsList(NULL), 102 103 m_TransformDialog(NULL) 103 104 { … … 156 157 ViewMenu->AppendCheckItem(ID_MENU_VIEW_AUIPANE_SCENE_SETUP, "Scene Setup", "Show or hide the scene setup inspector"); 157 158 ViewMenu->AppendCheckItem(ID_MENU_VIEW_AUIPANE_SUBMODELS_LIST, "Submodels List", "Show or hide the submodels list"); 159 ViewMenu->AppendCheckItem(ID_MENU_VIEW_AUIPANE_DLOD_MODELS_LIST, "LoD Models", "Show or hide the list of models for reduced levels of detail"); 158 160 ViewMenu->AppendCheckItem(ID_MENU_VIEW_AUIPANE_TRANSFORM_DIALOG, "Transform Dialog", "Show or hide the model transform dialog"); 159 161 ViewMenu->AppendSeparator(); … … 272 274 Name("SubmodelsPanel").Caption("Submodels"). 273 275 Right().Position(5)); 276 277 m_DlodModelsList=new wxStaticText(this, wxID_ANY, GetLodModelsString(), wxDefaultPosition, wxSize(260, 180), wxST_ELLIPSIZE_START); 278 m_AUIManager.AddPane(m_DlodModelsList, wxAuiPaneInfo(). 279 Name("DlodModelsList").Caption("Level-of-Detail Models"). 280 Right().Position(6)); 274 281 275 282 m_TransformDialog=new TransformDialogT(this, wxSize(248, 240)); … … 771 778 772 779 780 wxString ModelEditor::ChildFrameT::GetLodModelsString() const 781 { 782 wxString s; 783 784 for (const CafuModelT* Model=m_ModelDoc->GetModel(); Model; Model=Model->GetDlodModel()) 785 { 786 wxFileName fn(Model->GetFileName()); 787 788 fn.MakeRelativeTo(m_ModelDoc->GetGameConfig()->ModDir); 789 s+=fn.GetFullPath(wxPATH_UNIX); 790 791 if (Model->GetDlodModel()) 792 s+=wxString::Format(" (%.2f)\n", Model->GetDlodDist()); 793 else 794 s+=" (inf)"; 795 } 796 797 return s; 798 } 799 800 773 801 void ModelEditor::ChildFrameT::OnMenuView(wxCommandEvent& CE) 774 802 { … … 790 818 case ID_MENU_VIEW_AUIPANE_SCENE_SETUP: PaneToggleShow(m_AUIManager.GetPane(m_ScenePropGrid )); break; 791 819 case ID_MENU_VIEW_AUIPANE_SUBMODELS_LIST: PaneToggleShow(m_AUIManager.GetPane(m_SubmodelsPanel )); break; 820 case ID_MENU_VIEW_AUIPANE_DLOD_MODELS_LIST: PaneToggleShow(m_AUIManager.GetPane(m_DlodModelsList )); break; 792 821 case ID_MENU_VIEW_AUIPANE_TRANSFORM_DIALOG: PaneToggleShow(m_AUIManager.GetPane(m_TransformDialog )); break; 793 822 … … 826 855 case ID_MENU_VIEW_AUIPANE_SCENE_SETUP: UE.Check(m_AUIManager.GetPane(m_ScenePropGrid ).IsShown()); break; 827 856 case ID_MENU_VIEW_AUIPANE_SUBMODELS_LIST: UE.Check(m_AUIManager.GetPane(m_SubmodelsPanel ).IsShown()); break; 857 case ID_MENU_VIEW_AUIPANE_DLOD_MODELS_LIST: UE.Check(m_AUIManager.GetPane(m_DlodModelsList ).IsShown()); break; 828 858 case ID_MENU_VIEW_AUIPANE_TRANSFORM_DIALOG: UE.Check(m_AUIManager.GetPane(m_TransformDialog ).IsShown()); break; 829 859 } -
cafu/trunk/CaWE/ModelEditor/ChildFrame.hpp
r396 r407 103 103 void PaneToggleShow(wxAuiPaneInfo& PaneInfo); 104 104 105 /// Returns a string with all the LoD models loaded with the main model. 106 wxString GetLodModelsString() const; 107 105 108 wxString m_FileName; 106 109 ModelDocumentT* m_ModelDoc; … … 130 133 ScenePropGridT* m_ScenePropGrid; 131 134 SubmodelsPanelT* m_SubmodelsPanel; 135 wxStaticText* m_DlodModelsList; 132 136 TransformDialogT* m_TransformDialog; 133 137 … … 154 158 ID_MENU_VIEW_AUIPANE_SCENE_SETUP, 155 159 ID_MENU_VIEW_AUIPANE_SUBMODELS_LIST, 160 ID_MENU_VIEW_AUIPANE_DLOD_MODELS_LIST, 156 161 ID_MENU_VIEW_AUIPANE_TRANSFORM_DIALOG, 157 162 ID_MENU_VIEW_LOAD_DEFAULT_PERSPECTIVE, -
cafu/trunk/Libs/Models/Model_cmdl.hpp
r406 r407 321 321 BoundingBox3fT m_BindPoseBB; ///< [REMOVE???] The bounding-box for the base pose of the model. 322 322 323 CafuModelT* m_DlodModel; ///< Use the m_DlodModel instead of this when the camera is more tha tm_DlodDist away.323 CafuModelT* m_DlodModel; ///< Use the m_DlodModel instead of this when the camera is more than m_DlodDist away. 324 324 float m_DlodDist; ///< The distance beyond which the m_DlodModel is used instead of this. 325 325
